Created
October 14, 2015 19:20
-
-
Save agenteo/7a09eb9c8ced52fdb9ad to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
# BEFORE RUNNING: remember to "cp .env-example .env" in order for the tests | |
# to pick up the required environment variables! | |
unset BUNDLE_GEMFILE | |
result=0 | |
if [ "$CI" == "true" ]; then | |
BUNDLE_PATH="$HOME/vendor/bundle" | |
fi | |
for test_script in $(find . -name test.sh); do | |
pushd `dirname $test_script` > /dev/null | |
source "$HOME/.rvm/scripts/rvm" | |
rvm use $(cat .ruby-version)@$(cat .ruby-gemset) --create | |
./test.sh | |
result+=$? | |
popd > /dev/null | |
done | |
if [ $result -eq 0 ]; then | |
echo "๐ SUCCESS :-)" | |
else | |
echo "๐ FAILURE ;-(" | |
fi | |
exit $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment