mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
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:
@@ -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"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user