Skip to content

Improve Python version compatibility #1183

Improve Python version compatibility

Improve Python version compatibility #1183

Workflow file for this run

---
name: Tests
on:
push:
branches:
- main
pull_request: ~
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
statuses: write
jobs:
test:
name: "Python: ${{ matrix.python-version }}
on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04"]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
# Save resources - only verify the most recent Python versions on macOS.
include:
- os: 'macos-latest'
python-version: '3.13'
- os: 'macos-latest'
python-version: '3.14'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
cache-dependency-glob: |
pyproject.toml
cache-suffix: ${{ matrix.python-version }}
enable-cache: true
activate-environment: true
version: "latest"
- name: Setup env
run: uv pip install --group dev -e .
- name: Run Linters
run: |
ruff check .
mypy
- name: Run tests
run: |
coverage run -m pytest
coverage combine
coverage xml
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true