Skip to content

Update

Update #182

Workflow file for this run

name: Run tests
on:
push:
branches:
- master
- testing*
pull_request:
branches:
- master
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
strategy:
matrix:
name: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
include:
- name: "3.9"
python: "3.9"
tox_env: "py39"
- name: "3.10"
python: "3.10"
tox_env: "py310"
use_coverage: true
- name: "3.11"
python: "3.11"
tox_env: "py311"
- name: "3.12"
python: "3.12"
tox_env: "py312"
- name: "3.13"
python: "3.13"
tox_env: "py313"
- name: "3.14"
python: "3.14"
tox_env: "py314"
steps:
- uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install packages
run: pip install tox coverage
- name: Run tests without coverage
if: "! matrix.use_coverage"
run: "python -m tox -e ${{ matrix.tox_env }}"
- name: Run tests with coverage
if: "matrix.use_coverage"
run: "python -m tox -e ${{ matrix.tox_env }}-coverage -- --junitxml=junit.xml -o junit_family=legacy"
- name: Generate coverage report
if: "matrix.use_coverage"
run: python -m coverage xml
- name: Upload coverage to Codecov
if: "matrix.use_coverage"
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
lint:
runs-on: ubuntu-latest
name: linter
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.9"
- name: Install packages
run: pip install tox
- name: Run tests
run: tox -e linter