A platform for community discussion. Free, open, simple.
DEV: Add `SKIP_DB_CREATE` option to docker:test (#16225)
Jarek Radosze4a92a811395
diff --git a/lib/tasks/docker.rake b/lib/tasks/docker.rakeindex 22a80e833cc..2430499ce63 100644--- a/lib/tasks/docker.rake+++ b/lib/tasks/docker.rake@@ -100,8 +100,10 @@ task 'docker:test' doputs "Starting background redis"@redis_pid = Process.spawn('redis-server --dir tmp/test_data/redis')- puts "Initializing postgres"- system("script/start_test_db.rb --skip-run", exception: true)+ unless ENV['SKIP_DB_CREATE']+ puts "Initializing postgres"+ system("script/start_test_db.rb --skip-run", exception: true)+ endputs "Starting postgres"@pg_pid = Process.spawn("script/start_test_db.rb --skip-setup --exec")@@ -111,7 +113,9 @@ task 'docker:test' do# for js testsENV["SKIP_MULTISITE"] = "1" if ENV["JS_ONLY"]- @good &&= run_or_fail("bundle exec rake db:create")+ unless ENV['SKIP_DB_CREATE']+ @good &&= run_or_fail("bundle exec rake db:create")+ endif ENV['USE_TURBO']@good &&= run_or_fail("bundle exec rake parallel:create")