Files
matthias 99fd37fc12
CI/CD Pipeline / Lint & Check (push) Successful in 10s
CI/CD Pipeline / Build & Push Docker Image (push) Successful in 1m21s
test: implement unit testing suite with pytest and add pre-push verification hook
2026-05-13 00:12:32 +02:00

19 lines
370 B
Bash
Executable File

#!/bin/sh
# pre-push hook: runs unit tests before every git push
# To bypass: git push --no-verify
echo "🧪 Running unit tests..."
uv run pytest tests/unit/ -q
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo ""
echo "❌ Unit tests failed. Push aborted."
echo " To bypass: git push --no-verify"
exit 1
fi
echo "✅ All unit tests passed."
exit 0