Skip to content

Instantly share code, notes, and snippets.

@Saigesp
Last active January 12, 2020 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Saigesp/cf19378d1d9ca5d39b3f6d7650a3e826 to your computer and use it in GitHub Desktop.
Save Saigesp/cf19378d1d9ca5d39b3f6d7650a3e826 to your computer and use it in GitHub Desktop.
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