#!/usr/bin/env bash set -euo pipefail # Pre-commit hook: run tests and prevent commit on failures. # By default run fast tests (exclude integration). To include integration tests set RUN_INTEGRATION=1. echo "Running pytest (fast) before commit..." if [ "${RUN_INTEGRATION:-0}" = "1" ]; then echo "RUN_INTEGRATION=1: including integration tests" pytest -q else pytest -q -m "not integration" fi echo "Tests passed. Proceeding with commit."