#!/bin/sh
# Local pre-push gate: mirrors .github/workflows/ci.yml so failures surface
# before pushing instead of 30s later on GitHub.
set -e

# Version-independent checks
uv run ruff check src tests main.py
uv run ruff format --check src tests main.py
uv run mypy

# Version matrix: same as CI (3.10 / 3.11 / 3.12)
for v in 3.10 3.11 3.12; do
    echo "==> pytest on Python $v"
    uv run --python "$v" pytest -q
done
