From 44ab3eb66dbbcbbae0357156f6bfd9847e15d564 Mon Sep 17 00:00:00 2001 From: anonpenguin Date: Sat, 13 Sep 2025 06:02:56 +0300 Subject: [PATCH] Add pre-push hook to run all tests before pushing --- .githooks/pre-push | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .githooks/pre-push diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100644 index 0000000..5718cb0 --- /dev/null +++ b/.githooks/pre-push @@ -0,0 +1,11 @@ +#!/bin/bash + +echo -e "\nRunning tests:" +go test ./... # Runs all tests in your repo +status=$? +if [ $status -ne 0 ]; then + echo "Push aborted: some tests failed." + exit 1 +else + echo "All tests passed. Proceeding with push." +fi