summaryrefslogtreecommitdiffstats
path: root/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'hooks')
-rwxr-xr-xhooks/pre-commit8
1 files changed, 8 insertions, 0 deletions
diff --git a/hooks/pre-commit b/hooks/pre-commit
new file mode 100755
index 0000000..422b855
--- /dev/null
+++ b/hooks/pre-commit
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if [ $(git rev-parse --abbrev-ref HEAD) != "main" ]; then
+ exit 0
+fi
+
+echo "Running tests before commit to main"
+go test ./... \ No newline at end of file