mirror of
https://github.com/DeBrosOfficial/network.git
synced 2025-10-06 06:19:08 +00:00
Add pre-push hook to run all tests before pushing
This commit is contained in:
parent
feffcd2a74
commit
44ab3eb66d
11
.githooks/pre-push
Normal file
11
.githooks/pre-push
Normal 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
|
Loading…
x
Reference in New Issue
Block a user