mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Add USE_TURBO option to docker rake task (#7811)
This commit is contained in:
committed by
Penar Musaraj
parent
14a64e7c4c
commit
68d54d818a
@@ -112,7 +112,14 @@ task 'docker:test' do
|
|||||||
# for js tests
|
# for js tests
|
||||||
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
|
ENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]
|
||||||
|
|
||||||
@good &&= run_or_fail("bundle exec rake db:create")
|
db_rake_task_prefix =
|
||||||
|
if ENV['USE_TURBO']
|
||||||
|
'parallel'
|
||||||
|
else
|
||||||
|
'db'
|
||||||
|
end
|
||||||
|
|
||||||
|
@good &&= run_or_fail("bundle exec rake #{db_rake_task_prefix}:create")
|
||||||
|
|
||||||
if ENV["INSTALL_OFFICIAL_PLUGINS"]
|
if ENV["INSTALL_OFFICIAL_PLUGINS"]
|
||||||
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
|
@good &&= run_or_fail("bundle exec rake plugin:install_all_official")
|
||||||
@@ -122,11 +129,14 @@ task 'docker:test' do
|
|||||||
@good &&= run_or_fail("bundle exec rake plugin:update_all")
|
@good &&= run_or_fail("bundle exec rake plugin:update_all")
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV["SKIP_PLUGINS"]
|
command_prefix =
|
||||||
@good &&= run_or_fail("bundle exec rake db:migrate")
|
if ENV["SKIP_PLUGINS"]
|
||||||
else
|
""
|
||||||
@good &&= run_or_fail("LOAD_PLUGINS=1 bundle exec rake db:migrate")
|
else
|
||||||
end
|
"LOAD_PLUGINS=1 "
|
||||||
|
end
|
||||||
|
|
||||||
|
@good &&= run_or_fail("#{command_prefix}bundle exec rake #{db_rake_task_prefix}:migrate")
|
||||||
|
|
||||||
puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]
|
puts "travis_fold:end:prepare_tests" if ENV["TRAVIS"]
|
||||||
|
|
||||||
@@ -160,7 +170,11 @@ task 'docker:test' do
|
|||||||
puts "Running spec subset #{subset + 1} of #{total}"
|
puts "Running spec subset #{subset + 1} of #{total}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@good &&= run_or_fail("bundle exec rspec #{params.join(' ')}".strip)
|
if ENV['USE_TURBO']
|
||||||
|
@good &&= run_or_fail("bundle exec ./bin/turbo_rspec #{params.join(' ')}".strip)
|
||||||
|
else
|
||||||
|
@good &&= run_or_fail("bundle exec rspec #{params.join(' ')}".strip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
unless ENV["SKIP_PLUGINS"]
|
unless ENV["SKIP_PLUGINS"]
|
||||||
|
|||||||
Reference in New Issue
Block a user