name: test-python
on:
pull_request:
branches: [ "*" ]
workflow_call:
workflow_dispatch:
jobs:
test_python:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64]
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
sync-args: [--locked]
include:
- target: x86_64
python-version: "3.10.0"
sync-args: --resolution=lowest-direct
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: uv sync --extra pydantic --group test ${{ matrix.sync-args }}
- name: Format
run: |
uv run --no-sync ruff check
uv run --no-sync ruff format --check
- name: Static typing
run: uv run --no-sync pyright ./src
- name: Test (without PGO)
run: uv run --no-sync pytest
test_platforms:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-24.04-arm - runner: macos-15-intel - runner: macos-15 steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Test
run: |
uv sync --locked --no-editable --extra pydantic --group test --group bench
uv run --no-sync pytest .
test_pgo:
runs-on: ${{ matrix.platform.runner }}
strategy:
matrix:
platform:
- runner: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: "3.10"
- name: Install
run: |
uv sync --locked --no-editable --extra pydantic --group test --group bench
rustup component add llvm-tools-preview
- name: Profile-Guided Optimization (PGO)
shell: bash
run: |
sh ./scripts/distr_pgo.sh
- name: Test (with PGO)
run: |
uv run --no-sync pytest .