mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
103 lines
2.4 KiB
YAML
103 lines
2.4 KiB
YAML
name: Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [
|
|
"ubuntu-latest",
|
|
"macOS-latest",
|
|
]
|
|
python-version: [
|
|
"pypy3",
|
|
"3.8",
|
|
"3.7",
|
|
"3.6",
|
|
"3.5",
|
|
]
|
|
include:
|
|
- python-version: "3.5"
|
|
env: PYTHONOPTIMIZE=2
|
|
- python-version: "3.6"
|
|
env: PYTHONOPTIMIZE=1
|
|
runs-on: ${{ matrix.os }}
|
|
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Ubuntu cache
|
|
uses: actions/cache@v1
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
with:
|
|
path: ~/.cache/pip
|
|
key:
|
|
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-${{ matrix.python-version }}-
|
|
|
|
- name: macOS cache
|
|
uses: actions/cache@v1
|
|
if: startsWith(matrix.os, 'macOS')
|
|
with:
|
|
path: ~/Library/Caches/pip
|
|
key:
|
|
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
|
|
restore-keys: |
|
|
${{ matrix.os }}-${{ matrix.python-version }}-
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Build system information
|
|
run: python .github/workflows/system-info.py
|
|
|
|
- name: Install Linux dependencies
|
|
if: startsWith(matrix.os, 'ubuntu')
|
|
run: |
|
|
.ci/install.sh
|
|
|
|
- name: Install macOS dependencies
|
|
if: startsWith(matrix.os, 'macOS')
|
|
run: |
|
|
.github/workflows/macos-install.sh
|
|
|
|
- name: Build
|
|
run: |
|
|
.ci/build.sh
|
|
|
|
- name: Test
|
|
run: |
|
|
.ci/test.sh
|
|
|
|
- name: Upload errors
|
|
uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: errors
|
|
path: Tests/errors
|
|
|
|
- name: After success
|
|
if: success()
|
|
run: |
|
|
.ci/after_success.sh
|
|
env:
|
|
MATRIX_OS: ${{ matrix.os }}
|
|
|
|
- name: Prepare coverage token
|
|
if: success() && github.repository == 'python-pillow/Pillow'
|
|
run: cp .github/codecov-upstream.yml codecov.yml
|
|
|
|
- name: Upload coverage
|
|
if: success()
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|