Skip to content

Add support for different python version #4

Add support for different python version

Add support for different python version #4

Workflow file for this run

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v4
with:
version: "latest"
- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-groups
- name: Run linting
run: |
uv run black --check src/
uv run flake8 src/
uv run isort --check-only src/
- name: Run tests with coverage
run: |
PYTHONPATH=.:src uv run pytest tests/ \
--cov=src \
--cov-report=xml \
--cov-report=term-missing \
-v
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
fail_ci_if_error: false
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}