#!/bin/bash -x
export DISPLAY=:99
env
time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
# bundle exec rake stats
time bundle exec rake db:create db:migrate --trace && \
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \
RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace
EXIT_STATUS=$?
echo "EXIT STATUS: $EXIT_STATUS"
exit $EXIT_STATUS

#!/bin/bash -x
export DISPLAY=:99
env
time bundle install --path "${HOME}/bundles/${JOB_NAME}" --deployment
# bundle exec rake stats
time bundle exec rake db:create db:migrate db:test:prepare --trace && \
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:clean --trace && \
RAILS_ENV=test CUCUMBER_FORMAT=progress time bundle exec rake ci:setup:minitest default test:cleanup --trace && \
RAILS_ENV=production SKIP_OBSERVERS_FOR_ASSET_TASKS=true time bundle exec rake assets:precompile --trace
EXIT_STATUS=$?
echo "EXIT STATUS: $EXIT_STATUS"
exit $EXIT_STATUS

Revert "Preparing the test DB here is redundant."
Revert "Preparing the test DB here is redundant."

This reverts commit 979480b0f119358020f6201dfbec180da1dff9bc.

Turns out we need this because we're explicitly setting
RAILS_ENV=test when running the tests, and this prevents
`db:test:prepare` from actually dumping from the development
database
