DEV: apply plugin migrations when testing in Travis and Docker

In `RAILS_ENV=test`, plugins are not loaded by default. Therefore we need to explicitly specify `LOAD_PLUGINS=1` when we want to apply plugin migrations.
This commit is contained in:
David Taylor
2018-09-13 12:39:54 +01:00
parent 9461c99210
commit b8c0e77908
2 changed files with 6 additions and 2 deletions

View File

@@ -95,7 +95,11 @@ task 'docker:test' do
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
end
@good &&= run_or_fail("bundle exec rake db:migrate")
if ENV["SKIP_PLUGINS"]
@good &&= run_or_fail("bundle exec rake db:migrate")
else
@good &&= run_or_fail("LOAD_PLUGINS=1 bundle exec rake db:migrate")
end
puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]