Created
February 5, 2016 08:26
-
-
Save toast38coza/6f18c964685168dabfb2 to your computer and use it in GitHub Desktop.
pre-push hook. Run django tests inside docker before pushing
This file contains hidden or 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/bash | |
| docker-compose run web python manage.py test | |
| RESULT=$? | |
| if [ $RESULT -ne 0 ]; then | |
| echo "" | |
| echo "" | |
| echo "\******************" | |
| echo "Oh hell no!" | |
| echo "The tests have failed. Cancelling push" | |
| echo "------------------" | |
| echo "If you _really_ want to push this code push with the --no-verify switch" | |
| echo "" | |
| exit 1 | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment