Skip to content

Instantly share code, notes, and snippets.

@fjarrett
Last active November 7, 2015 19:34
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 fjarrett/3c019e56ca8a92e3fb5c to your computer and use it in GitHub Desktop.
Save fjarrett/3c019e56ca8a92e3fb5c to your computer and use it in GitHub Desktop.
Git pre-commit hook for Codeception on VVV
#!/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