Emulate the CI rake tests with the cibuild script

Creates the databases and runs the tests depending upon the database url in use.
If mysql, the cucumber is ran. If not mysql, then only the test suite is run.
This commit is contained in:
Matt Rogers 2018-01-05 13:53:00 -06:00
parent 62ef5db39d
commit 5ad41bb16f

View file

@ -1,8 +1,12 @@
#!/usr/bin/env bash #!/usr/bin/env bash
if [[ "$DATABASE_URL" == 'mysql*' ]] export RAILS_ENV=test
export COVERAGE=true
bundle exec rake db:create
if [[ $DATABASE_URL == mysql* ]]
then then
bundle exec rake ci:full bundle exec cucumber --profile default && bundle exec rake test
else else
bundle exec rake ci:lite bundle exec rake test
fi fi