We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c821a2 commit 9f3e39eCopy full SHA for 9f3e39e
1 file changed
scripts/pre-push.sh
@@ -1,6 +1,6 @@
1
#!/bin/bash
2
# Pre-push hook - runs before pushing to remote
3
-# This hook runs tests to catch issues before they reach CI
+# This hook runs lint and format checks before push
4
5
set -e
6
@@ -27,16 +27,7 @@ python3 -m ruff format . || {
27
exit 1
28
}
29
30
-# Run tests (only if test files exist)
31
-if python3 -m pytest --collect-only -q 2>&1 | grep -q "test session starts"; then
32
- echo "🧪 Running tests..."
33
- python3 -m pytest --no-cov -q || {
34
- echo "❌ Tests failed. Please fix failing tests."
35
- exit 1
36
- }
37
-else
38
- echo "⚠️ No tests found, skipping..."
39
-fi
40
-
41
echo "✅ All pre-push checks passed!"
+echo ""
+echo "💡 Tip: Run 'pytest' locally before pushing to catch test failures."
42
exit 0
0 commit comments