oterm/.github/workflows/test.yml
Yiorgis Gozadinos 0fdd7db25d
Bump pydantic-ai to 2.51.0 and drop Python 3.10
pydantic-ai-slim 2.37.0 -> 2.51.0 and pydantic-ai-harness 0.28.0 ->
0.36.0, which includes the 2.44.0 web_fetch fixes (a hostile page could
stall the event loop). ruff 0.16.9, ty 0.0.84, full lock refresh.
pytest-textual-snapshot stays at 1.0.0: 1.1.0 pins syrupy 4.8.0, which
requires pytest<9.

Python 3.10 reaches end of life in October; requires-python is now
>=3.11, so the speak extra no longer needs its version marker.

ty 0.0.84 rejects assigning a function to a model instance's
request_stream, so the file-aware test model is now a FunctionModel
subclass.
2026-09-26 15:51:22 +03:00

67 lines
1.8 KiB
YAML

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras
- name: Lint
run: uv run ruff check
- name: Format check
run: uv run ruff format --check
- name: Type check
run: uv run ty check
test:
needs: [lint]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
include:
- python-version: "3.11"
pytest-args: "--no-cov"
- python-version: "3.12"
pytest-args: "--no-cov"
- python-version: "3.14"
pytest-args: "--no-cov"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
with:
enable-cache: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: uv sync --all-extras
- name: Run tests
run: uv run pytest ${{ matrix.pytest-args || '--cov --cov-report=xml' }}
- name: Upload coverage to Codecov
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false