| 1 |
name: Tests |
| 2 |
|
| 3 |
on: |
| 4 |
push: |
| 5 |
branches: [master] |
| 6 |
pull_request: |
| 7 |
branches: [master] |
| 8 |
workflow_dispatch: |
| 9 |
inputs: |
| 10 |
reason: |
| 11 |
description: 'Reason for running workflow' |
| 12 |
required: true |
| 13 |
|
| 14 |
jobs: |
| 15 |
|
| 16 |
test: |
| 17 |
runs-on: ${{ matrix.platform }} |
| 18 |
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')" |
| 19 |
strategy: |
| 20 |
matrix: |
| 21 |
python-version: ['3.9', '3.11', '3.12', '3.13', '3.14'] |
| 22 |
platform: [ubuntu-latest, macos-latest, windows-latest] |
| 23 |
exclude: |
| 24 |
- platform: macos-latest |
| 25 |
python-version: 3.11 |
| 26 |
- platform: windows-latest |
| 27 |
python-version: 3.11 |
| 28 |
- platform: macos-latest |
| 29 |
python-version: 3.12 |
| 30 |
- platform: windows-latest |
| 31 |
python-version: 3.12 |
| 32 |
- platform: macos-latest |
| 33 |
python-version: 3.13 |
| 34 |
- platform: windows-latest |
| 35 |
python-version: 3.13 |
| 36 |
steps: |
| 37 |
- uses: actions/checkout@v2 |
| 38 |
- name: Set up Python ${{ matrix.python-version }} |
| 39 |
uses: actions/setup-python@v2 |
| 40 |
with: |
| 41 |
python-version: ${{ matrix.python-version }} |
| 42 |
- name: Install packages |
| 43 |
run: pip install tox coverage |
| 44 |
- name: Run Tox |
| 45 |
run: tox -e py-cov |
| 46 |
- name: Produce coverage files |
| 47 |
run: | |
| 48 |
coverage combine |
| 49 |
coverage xml |
| 50 |
- name: Upload coverage to Codecov |
| 51 |
uses: codecov/codecov-action@v4 |
| 52 |
with: |
| 53 |
file: coverage.xml |
| 54 |
flags: unittests |
| 55 |
name: codecov-umbrella |
| 56 |
fail_ci_if_error: true |
| 57 |
token: ${{ secrets.CODECOV_TOKEN }} |