Merge pull request #6395 from discourse/plugin-migrations

DEV: apply plugin migrations when testing in Travis and Docker
This commit is contained in:
Guo Xiang Tan 2018-09-13 06:51:30 -07:00 committed by GitHub
commit f2363650c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -68,7 +68,7 @@ install:
- bash -c "if [ '$RAILS_MASTER' == '1' ]; then bundle update --retry=3 --jobs=3 arel rails seed-fu > /dev/null; fi" - bash -c "if [ '$RAILS_MASTER' == '1' ]; then bundle update --retry=3 --jobs=3 arel rails seed-fu > /dev/null; fi"
- bash -c "if [ '$RAILS_MASTER' == '0' ]; then bundle install --without development --deployment --retry=3 --jobs=3 > /dev/null; fi" - bash -c "if [ '$RAILS_MASTER' == '0' ]; then bundle install --without development --deployment --retry=3 --jobs=3 > /dev/null; fi"
- bash -c "if [ '$QUNIT_RUN' == '1' ] || [ '$RUN_LINT' == '1' ]; then yarn install --dev > /dev/null; fi" - bash -c "if [ '$QUNIT_RUN' == '1' ] || [ '$RUN_LINT' == '1' ]; then yarn install --dev > /dev/null; fi"
- bash -c "if [ '$RUN_LINT' != '1' ]; then bundle exec rake db:create db:migrate > /dev/null; fi" - bash -c "if [ '$RUN_LINT' != '1' ]; then LOAD_PLUGINS=1 bundle exec rake db:create db:migrate > /dev/null; fi"
script: script:
- | - |

View File

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