Add pre-push hook to run all tests before pushing

This commit is contained in:
anonpenguin 2025-09-13 06:02:56 +03:00
parent feffcd2a74
commit 44ab3eb66d

11
.githooks/pre-push Normal file
View File

@ -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