Last active
November 7, 2015 19:34
-
-
Save fjarrett/3c019e56ca8a92e3fb5c to your computer and use it in GitHub Desktop.
Git pre-commit hook for Codeception on VVV
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
#!/bin/bash | |
CODECEPTION_CHECK=1 | |
SELF_DIR=$( pwd ) | |
echo "Checking staged changes..." | |
# Run Codeception tests | |
if [ "$CODECEPTION_CHECK" == 1 ]; then | |
if [ -f "$SELF_DIR/codeception.yml" ]; then | |
exec vassh wp codeception run --debug | |
if [ $RETVAL -ne 0 ]; then | |
exit 1 | |
fi | |
else | |
echo "Codeception is not configured!" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment