Skip to content

Instantly share code, notes, and snippets.

@agenteo
Created October 14, 2015 19:20
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 agenteo/7a09eb9c8ced52fdb9ad to your computer and use it in GitHub Desktop.
Save agenteo/7a09eb9c8ced52fdb9ad to your computer and use it in GitHub Desktop.
#!/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