mirror of
https://github.com/discourse/discourse.git
synced 2025-06-14 19:29:21 +08:00
DEV: Move warmup inside docker rake task
This commit is contained in:
@ -16,6 +16,7 @@
|
|||||||
# => RSPEC_SEED set to seed to use for rspec tests (applies to core rspec tests only)
|
# => RSPEC_SEED set to seed to use for rspec tests (applies to core rspec tests only)
|
||||||
# => PAUSE_ON_TERMINATE set to 1 to pause prior to terminating redis and pg
|
# => PAUSE_ON_TERMINATE set to 1 to pause prior to terminating redis and pg
|
||||||
# => JS_TIMEOUT set timeout for qunit tests in ms
|
# => JS_TIMEOUT set timeout for qunit tests in ms
|
||||||
|
# => WARMUP_TMP_FOLDER runs a single spec to warmup the tmp folder and obtain accurate results when profiling specs.
|
||||||
#
|
#
|
||||||
# Other useful environment variables (not specific to this rake task)
|
# Other useful environment variables (not specific to this rake task)
|
||||||
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
|
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
|
||||||
@ -143,6 +144,11 @@ task 'docker:test' do
|
|||||||
|
|
||||||
unless ENV["JS_ONLY"]
|
unless ENV["JS_ONLY"]
|
||||||
puts "travis_fold:start:ruby_tests" if ENV["TRAVIS"]
|
puts "travis_fold:start:ruby_tests" if ENV["TRAVIS"]
|
||||||
|
|
||||||
|
if ENV['WARMUP_TMP_FOLDER']
|
||||||
|
run_or_fail('bundle exec rspec ./spec/requests/users_controller_spec.rb:222')
|
||||||
|
end
|
||||||
|
|
||||||
unless ENV["SKIP_CORE"]
|
unless ENV["SKIP_CORE"]
|
||||||
params = []
|
params = []
|
||||||
|
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
|
# => COMMIT_HASH used by the discourse_test docker image to load a specific commit of discourse
|
||||||
# this can also be set to a branch, e.g. "origin/tests-passed"
|
# this can also be set to a branch, e.g. "origin/tests-passed"
|
||||||
# => RUN_SMOKE_TESTS executes the smoke tests instead of the regular tests from docker.rake
|
# => RUN_SMOKE_TESTS executes the smoke tests instead of the regular tests from docker.rake
|
||||||
# => WARMUP_TMP_FOLDER runs a single spec to warmup the tmp folder and obtain accurate results when profiling specs.
|
|
||||||
# See lib/tasks/docker.rake and lib/tasks/smoke_test.rake for more information
|
# See lib/tasks/docker.rake and lib/tasks/smoke_test.rake for more information
|
||||||
|
|
||||||
puts "travis_fold:end:starting_docker_container" if ENV["TRAVIS"]
|
puts "travis_fold:end:starting_docker_container" if ENV["TRAVIS"]
|
||||||
@ -40,10 +39,6 @@ unless ENV['NO_UPDATE']
|
|||||||
puts "travis_fold:end:bundle" if ENV["TRAVIS"]
|
puts "travis_fold:end:bundle" if ENV["TRAVIS"]
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['WARMPUP_TMP_FOLDER']
|
|
||||||
run_or_fail('bundle exec rspec ./spec/requests/users_controller_spec.rb:222')
|
|
||||||
end
|
|
||||||
|
|
||||||
log("Running tests")
|
log("Running tests")
|
||||||
if ENV['RUN_SMOKE_TESTS']
|
if ENV['RUN_SMOKE_TESTS']
|
||||||
run_or_fail("bundle exec rake smoke:test")
|
run_or_fail("bundle exec rake smoke:test")
|
||||||
|
Reference in New Issue
Block a user