copilot test
This commit is contained in:
14
.githooks/pre-commit
Executable file
14
.githooks/pre-commit
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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."
|
||||
Reference in New Issue
Block a user