mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-27 02:16:19 +03:00
Fixed Python coverage on Docker GHA
This commit is contained in:
parent
04262913a2
commit
6eed483820
|
@ -1,8 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# gather the coverage data
|
# gather the coverage data
|
||||||
pip install codecov
|
pip3 install codecov
|
||||||
coverage xml
|
if [[ $MATRIX_DOCKER ]]; then
|
||||||
|
coverage xml --ignore-errors
|
||||||
|
else
|
||||||
|
coverage xml
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $TRAVIS ]]; then
|
if [[ $TRAVIS ]]; then
|
||||||
codecov
|
codecov
|
||||||
|
|
9
.github/workflows/test-docker.yml
vendored
9
.github/workflows/test-docker.yml
vendored
|
@ -41,16 +41,21 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
# The Pillow user in the docker container is UID 1000
|
# The Pillow user in the docker container is UID 1000
|
||||||
sudo chown -R 1000 $GITHUB_WORKSPACE
|
sudo chown -R 1000 $GITHUB_WORKSPACE
|
||||||
docker run -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
||||||
sudo chown -R runner $GITHUB_WORKSPACE
|
sudo chown -R runner $GITHUB_WORKSPACE
|
||||||
|
|
||||||
- name: After success
|
- name: After success
|
||||||
if: success()
|
if: success()
|
||||||
run: |
|
run: |
|
||||||
PATH="$PATH:~/.local/bin"
|
PATH="$PATH:~/.local/bin"
|
||||||
|
docker start pillow_container
|
||||||
|
pil_path=`docker exec pillow_container /vpy3/bin/python -c 'import os, PIL;print(os.path.realpath(os.path.dirname(PIL.__file__)))'`
|
||||||
|
docker stop pillow_container
|
||||||
|
sudo mkdir -p $pil_path
|
||||||
|
sudo cp src/PIL/*.py $pil_path
|
||||||
.ci/after_success.sh
|
.ci/after_success.sh
|
||||||
env:
|
env:
|
||||||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
|
MATRIX_DOCKER: ${{ matrix.docker }}
|
||||||
|
|
||||||
- name: Prepare coverage token
|
- name: Prepare coverage token
|
||||||
if: success() && github.repository == 'python-pillow/Pillow'
|
if: success() && github.repository == 'python-pillow/Pillow'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user