.github/workflows/tests.yaml
name: Tests
on:
pull_request:
push:
branches:
- "main"
tags:
- "*"
jobs:
pytest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
name: pytest-${{ matrix.python-version }}
steps:
- name: Check out
uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Set up python environment
uses: actions/setup-python@v5
with:
cache: 'poetry'
python-version: ${{ matrix.python-version }}
- run: poetry install --no-root --with=tests --sync
- run: poetry run pytest --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
name: coverage-${{ matrix.python-version }}