Created
February 17, 2016 20:51
-
-
Save kasei/0819f25cee79b3597576 to your computer and use it in GitHub Desktop.
Git pre-push hook for running the Attean test suite
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
perl Makefile.PL && make | |
if prove -l t/ xt/ | |
then | |
exit 0 | |
else | |
echo '*** Test suite failed; not committing' | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Save this as
attean/.git/hooks/pre-push
and make it executablechmod 755 attean/.git/hooks/pre-push
and it will prevent you from pushing to github if the test suite isn't passing.