Skip to content

PyPI shield

PyPI shield #15

Workflow file for this run

name: Test
on: [push, pull_request, workflow_call]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Run tests
run: uv run --isolated --locked --python ${{ matrix.python-version }} --python-preference only-system pytest
- name: Lint
run: |
uv run --python ${{ matrix.python-version }} --python-preference only-system ruff format --check
uv run --python ${{ matrix.python-version }} --python-preference only-system ruff check
- name: Mypy
# Disable until fix released https://github.com/pydantic/pydantic/pull/10979
if: ${{ matrix.python-version != '3.13' }}
run: |
uv run --python ${{ matrix.python-version }} --python-preference only-system mypy