37 lines
957 B
YAML
37 lines
957 B
YAML
# Test — Python. Runs on push and pull request to development. Never on main.
|
|
# The 80 % coverage gate lives in pyproject.toml (addopts --cov-fail-under=80),
|
|
# so `uv run pytest` enforces it here exactly as it does locally.
|
|
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches: [development]
|
|
pull_request:
|
|
branches: [development]
|
|
merge_group:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: fedora
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- name: Set up Python and uv
|
|
uses: astral-sh/setup-uv@v6
|
|
with:
|
|
python-version: "3.14" # match requires-python in pyproject.toml
|
|
enable-cache: true
|
|
cache-dependency-glob: "uv.lock"
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --frozen --group dev
|
|
|
|
- name: Lint (ruff check)
|
|
run: uv run ruff check src/ tests/
|
|
|
|
- name: Format (ruff format --check)
|
|
run: uv run ruff format --check src/ tests/
|
|
|
|
- name: Tests (pytest)
|
|
run: uv run pytest
|