Parallel Coverage in CI #209
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
tags-ignore: | |
- '**' | |
pull_request: | |
jobs: | |
test-py3: | |
strategy: | |
fail-fast: False | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python: | |
- version: "3.7" | |
tox-prefix: py37 | |
- version: "3.8" | |
tox-prefix: py38 | |
- version: "3.9" | |
tox-prefix: py39 | |
- version: "3.10" | |
tox-prefix: py310 | |
- version: "3.11" | |
tox-prefix: py311 | |
- version: "3.12" | |
tox-prefix: py312 | |
- version: "pypy3.10" | |
tox-prefix: pypy310 | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python.version }} | |
architecture: x64 | |
- name: Install Dependencies | |
run: | | |
pip install -U pip | |
pip install -U wheel setuptools tox coverage | |
- name: Test | |
run: tox -vv -f ${{ matrix.python.tox-prefix }} -- --cov-report=xml | |
env: | |
TOX_DISCOVER: "patch-for-windows-pypy3" | |
- name: Combine Coverage | |
run: | | |
find . -name ".coverage.*" -exec mv {} ./ \; | |
coverage combine | |
coverage xml | |
- name: Upload Coverage to Codecov | |
uses: codecov/codecov-action@v1 | |
with: | |
files: coverage.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
- name: Lint | |
run: tox -vv | |
env: | |
TOXENV: lint | |
if: matrix.python.version == 3.9 && matrix.os == 'ubuntu-latest' | |
- name: Docs | |
run: tox -vv | |
env: | |
TOXENV: docs | |
if: matrix.python.version == 3.9 && matrix.os == 'ubuntu-latest' |