2019-09-14 12:29:33 +03:00
|
|
|
name: Test Docker
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
2020-03-11 19:30:11 +03:00
|
|
|
fail-fast: false
|
2019-09-14 12:29:33 +03:00
|
|
|
matrix:
|
|
|
|
docker: [
|
|
|
|
alpine,
|
|
|
|
arch,
|
|
|
|
ubuntu-18.04-bionic-amd64,
|
2020-04-24 15:35:42 +03:00
|
|
|
ubuntu-20.04-focal-amd64,
|
2019-09-14 12:29:33 +03:00
|
|
|
debian-10-buster-x86,
|
|
|
|
centos-7-amd64,
|
2019-12-26 10:48:18 +03:00
|
|
|
centos-8-amd64,
|
2019-09-14 12:29:33 +03:00
|
|
|
amazon-2-amd64,
|
2020-04-29 16:03:42 +03:00
|
|
|
fedora-32-amd64,
|
2020-10-27 22:47:06 +03:00
|
|
|
fedora-33-amd64,
|
2019-09-14 12:29:33 +03:00
|
|
|
]
|
|
|
|
dockerTag: [master]
|
|
|
|
|
|
|
|
name: ${{ matrix.docker }}
|
|
|
|
|
|
|
|
steps:
|
2020-03-29 23:27:24 +03:00
|
|
|
- uses: actions/checkout@v2
|
2019-09-14 12:29:33 +03:00
|
|
|
|
2019-12-09 23:35:31 +03:00
|
|
|
- name: Build system information
|
|
|
|
run: python .github/workflows/system-info.py
|
|
|
|
|
2019-09-14 12:29:33 +03:00
|
|
|
- name: Docker pull
|
|
|
|
run: |
|
|
|
|
docker pull pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
|
|
|
|
|
|
|
- name: Docker build
|
|
|
|
run: |
|
|
|
|
# The Pillow user in the docker container is UID 1000
|
|
|
|
sudo chown -R 1000 $GITHUB_WORKSPACE
|
2020-01-24 14:36:49 +03:00
|
|
|
docker run --name pillow_container -v $GITHUB_WORKSPACE:/Pillow pythonpillow/${{ matrix.docker }}:${{ matrix.dockerTag }}
|
2019-12-30 12:44:15 +03:00
|
|
|
sudo chown -R runner $GITHUB_WORKSPACE
|
|
|
|
|
|
|
|
- name: After success
|
|
|
|
run: |
|
|
|
|
PATH="$PATH:~/.local/bin"
|
2020-01-24 14:36:49 +03:00
|
|
|
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
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/after_success.sh
|
2019-12-30 12:44:15 +03:00
|
|
|
env:
|
2020-01-24 14:36:49 +03:00
|
|
|
MATRIX_DOCKER: ${{ matrix.docker }}
|
2019-12-30 12:44:15 +03:00
|
|
|
|
|
|
|
- name: Upload coverage
|
|
|
|
uses: codecov/codecov-action@v1
|
|
|
|
with:
|
2020-01-24 15:14:56 +03:00
|
|
|
flags: GHA_Docker
|
2019-12-30 13:37:40 +03:00
|
|
|
name: ${{ matrix.docker }}
|
2020-09-23 09:56:17 +03:00
|
|
|
|
|
|
|
success:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Docker Test Successful
|
|
|
|
steps:
|
|
|
|
- name: Success
|
|
|
|
run: echo Docker Test Successful
|