Skip to content

Instantly share code, notes, and snippets.

@rfreebern
Created October 12, 2012 14:51
Show Gist options
  • Save rfreebern/3879583 to your computer and use it in GitHub Desktop.
Save rfreebern/3879583 to your computer and use it in GitHub Desktop.
Run phpunit tests before allowing a commit
#!/usr/bin/env bash
git stash -q --keep-index
phpunit tests/
RESULT=$?
git stash pop -q
[ $RESULT -ne 0 ] && exit 1
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment