Skip to content

[pre-commit.ci] pre-commit autoupdate (#471) #1652

[pre-commit.ci] pre-commit autoupdate (#471)

[pre-commit.ci] pre-commit autoupdate (#471) #1652

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python Tests
on:
push:
branches: [main]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
jobs:
build:
name: Test Python ${{ matrix.python-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0
with:
enable-cache: true
prune-cache: false
- name: Set up Python
run: uv python install '${{ matrix.python-version }}' # zizmor: ignore[template-injection]
- name: Prepare project for development
run: uv sync
- name: Check types
run: uv run mypy src
- name: Test with pytest
run: |
uv run coverage run -m pytest
uv run coverage report --show-missing