summaryrefslogtreecommitdiff
path: root/2025/ocaml/.githooks/pre-push
diff options
context:
space:
mode:
Diffstat (limited to '2025/ocaml/.githooks/pre-push')
-rwxr-xr-x2025/ocaml/.githooks/pre-push18
1 files changed, 18 insertions, 0 deletions
diff --git a/2025/ocaml/.githooks/pre-push b/2025/ocaml/.githooks/pre-push
new file mode 100755
index 0000000..51a8761
--- /dev/null
+++ b/2025/ocaml/.githooks/pre-push
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# Pre-push hook - run tests before pushing
+
+set -e
+
+echo "๐Ÿงช Running tests before push..."
+
+# Run the full test suite
+task test
+
+if [ $? -eq 0 ]; then
+ echo "โœ… All tests passed! Push allowed."
+ exit 0
+else
+ echo "โŒ Tests failed! Push blocked."
+ echo "Fix the failing tests before pushing."
+ exit 1
+fi