Skip to content

Commit

Permalink
DEV: run db:create and db:migrate on turbo specs
Browse files Browse the repository at this point in the history
This ensures multisite specs run correctly when running ./bin/turbo_rspec
  • Loading branch information
pmusaraj committed Jul 8, 2019
1 parent bb8cf81 commit befcf67
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions lib/tasks/docker.rake
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,11 @@ task 'docker:test' do
# for js tests
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]

db_rake_task_prefix =
if ENV['USE_TURBO']
'parallel'
else
'db'
end
@good &&= run_or_fail("bundle exec rake db:create")

@good &&= run_or_fail("bundle exec rake #{db_rake_task_prefix}:create")
if ENV['USE_TURBO']
@good &&= run_or_fail("bundle exec rake parallel:create")
end

if ENV["INSTALL_OFFICIAL_PLUGINS"]
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
Expand All @@ -136,7 +133,11 @@ task 'docker:test' do
"LOAD_PLUGINS=1 "
end

@good &&= run_or_fail("#{command_prefix}bundle exec rake #{db_rake_task_prefix}:migrate")
@good &&= run_or_fail("#{command_prefix}bundle exec rake db:migrate")

if ENV['USE_TURBO']
@good &&= run_or_fail("bundle exec rake parallel:migrate")
end

puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]

Expand Down

0 comments on commit befcf67

Please sign in to comment.