From 5ad41bb16f5eb7edcf27cc4e0512037254bcdd28 Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Fri, 5 Jan 2018 13:53:00 -0600 Subject: [PATCH] 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. --- script/cibuild | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/script/cibuild b/script/cibuild index d6cbdd21..a2b8e51f 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,8 +1,12 @@ #!/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 - bundle exec rake ci:full + bundle exec cucumber --profile default && bundle exec rake test else - bundle exec rake ci:lite + bundle exec rake test fi