#!/usr/bin/env sh
# The gate, enforced locally: exactly what CI runs. Install with scripts/install-hooks.sh.
# Scoped to the project paths so stray directories in the checkout don't block a push.
set -e
cd "$(git rev-parse --show-toplevel)"
PY=.venv/bin/python
[ -x "$PY" ] || PY=python3
echo "pre-push: ruff check"
"$PY" -m ruff check src/uscript tests scripts
echo "pre-push: pytest -x -q"
"$PY" -m pytest -x -q -W ignore
