Remove pre-push hook that required Docker for tests
This commit is contained in:
parent
6489012e8f
commit
79586015f1
1 changed files with 0 additions and 27 deletions
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# pre-push hook: runs the test suite before allowing a push.
|
||||
# If tests fail, the push is aborted.
|
||||
#
|
||||
|
||||
echo "Running tests before push..."
|
||||
|
||||
# Check if the app container is running
|
||||
if ! docker compose ps --status running 2>/dev/null | grep -q rec-app; then
|
||||
echo "ERROR: rec-app container is not running."
|
||||
echo "Start it with: docker compose up -d"
|
||||
echo "Skipping tests — push blocked."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker compose exec -T app pytest tests/ -v --tb=short
|
||||
status=$?
|
||||
|
||||
if [ $status -ne 0 ]; then
|
||||
echo ""
|
||||
echo "Tests failed — push aborted."
|
||||
echo "Fix the failures and try again, or push with --no-verify to skip."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit 0
|
||||
Loading…
Add table
Add a link
Reference in a new issue