Files
scenar-creator/.githooks/pre-commit
Martin Sukany 9a7ffdeb2c copilot test
2025-11-13 11:37:28 +01:00

15 lines
447 B
Bash
Executable File

#!/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."