add pre-commit hook, the script will run test before commit, if test fails, abort commit