Skip to content

Tests

Tests #739

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
schedule:
- cron: "15 1 * * *" # every day at 01:15
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests:
name: ${{ matrix.python }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python: ["3.9", "3.10", "3.11"]
env:
FORCE_COLOR: "1"
PRE_COMMIT_COLOR: "always"
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ matrix.python }}
- name: Upgrade pip and nox
run: |
pip install -U pip nox
pip --version
- name: Lint with pre-commit and mypy
run: |
nox -v --session pre-commit mypy
- name: Run tests
run: |
nox -v --session tests-${{ matrix.python }} -- --cov-report=xml
- name: Upload coverage report
uses: codecov/codecov-action@v4
if: always()
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
fail_ci_if_error: true