Skip to content

Parallel Coverage in CI #213

Parallel Coverage in CI

Parallel Coverage in CI #213

Workflow file for this run

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: |
coverage combine ./.tox/*/.coverage.*
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'