Last active
January 12, 2020 23:14
-
-
Save Saigesp/cf19378d1d9ca5d39b3f6d7650a3e826 to your computer and use it in GitHub Desktop.
git pre-commit hook to run some tests and linters
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
# Run django test before commit, abort if fails | |
python manage.py test || exit 1 | |
# Run vue tests and linter before commit, abort if fails | |
EXIT_STATUS=0 | |
npm run lint || EXIT_STATUS=$? | |
npm run test:unit || EXIT_STATUS=$? | |
exit $EXIT_STATUS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment