Skip to content

Instantly share code, notes, and snippets.

@Saigesp

Saigesp/pre-commit

Last active Jan 12, 2020
Embed
What would you like to do?
git pre-commit hook to run some tests and linters
# 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
You can’t perform that action at this time.