A platform for community discussion. Free, open, simple.
Revert "DEV: Use runtime info to split test files for parallel testing (#21896)" (#22016)
Daniel Waterworth67afd85aae13
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.ymlindex b6cbd383a15..83814afb118 100644--- a/.github/workflows/tests.yml+++ b/.github/workflows/tests.yml@@ -150,11 +150,10 @@ jobs:- name: Fetch turbo_rspec_runtime.log cacheuses: actions/cache@v3id: test-runtime-cache- if: matrix.build_type == 'backend' || matrix.build_type == 'system'+ if: matrix.build_type == 'backend' && matrix.target == 'core'with:path: tmp/turbo_rspec_runtime.log- key: rspec-runtime-${{ matrix.build_type }}-${{ matrix.target }}-${{ github.run_id }}- restore-keys: rspec-runtime-${{ matrix.build_type }}-${{ matrix.target }}-+ key: rspec-runtime-backend-core- name: Run Zeitwerk checkif: matrix.build_type == 'backend'@@ -174,11 +173,11 @@ jobs:- name: Core RSpecif: matrix.build_type == 'backend' && matrix.target == 'core'- run: bin/turbo_rspec --use-runtime-info --verbose+ run: bin/turbo_rspec --verbose- name: Plugin RSpecif: matrix.build_type == 'backend' && matrix.target == 'plugins'- run: bin/rake plugin:turbo_spec['*','--verbose --format documentation --use-runtime-info']+ run: bin/rake plugin:turbo_spec['*','--verbose --format documentation']- name: Plugin QUnitif: matrix.build_type == 'frontend' && matrix.target == 'plugins'@@ -195,11 +194,11 @@ jobs:- name: Core System Testsif: matrix.build_type == 'system' && matrix.target == 'core'- run: PARALLEL_TEST_PROCESSORS=5 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation spec/system+ run: PARALLEL_TEST_PROCESSORS=5 bin/turbo_rspec --profile=50 --verbose --format documentation spec/system- name: Plugin System Testsif: matrix.build_type == 'system' && matrix.target == 'plugins'- run: LOAD_PLUGINS=1 PARALLEL_TEST_PROCESSORS=5 bin/turbo_rspec --use-runtime-info --profile=50 --verbose --format documentation plugins/*/spec/system+ run: LOAD_PLUGINS=1 PARALLEL_TEST_PROCESSORS=5 bin/turbo_rspec --profile=50 --verbose --format documentation plugins/*/spec/systemtimeout-minutes: 30- name: Upload failed system test screenshotsdiff --git a/bin/turbo_rspec b/bin/turbo_rspecindex bdf8f42b6a7..75cf12f4cf4 100755--- a/bin/turbo_rspec+++ b/bin/turbo_rspec@@ -14,14 +14,6 @@ seed = rand(2**16)profile = falseprofile_print_slowest_examples_count = 10-if ARGV.empty?- files = TurboTests::Runner.default_spec_folders- use_runtime_info = true-else- files = ARGV- use_runtime_info = false-end-OptionParser.new do |opts|opts.on("-r", "--require PATH", "Require a file.") { |filename| requires << filename }@@ -57,10 +49,6 @@ OptionParserendopts.on("--seed SEED", "The seed for the random order") { |s| seed = s.to_i }-- opts.on("--use-runtime-info", "Use runtime info for tests group splitting") do- use_runtime_info = true- endend.parse!(ARGV)@@ -70,6 +58,14 @@ formatters << { name: "progress", outputs: [] } if formatters.empty?formatters.each { |formatter| formatter[:outputs] << "-" if formatter[:outputs].empty? }+if ARGV.empty?+ files = TurboTests::Runner.default_spec_folders+ use_runtime_info = true+else+ files = ARGV+ use_runtime_info = false+end+puts "::group::Run turbo_rspec" if ENV["GITHUB_ACTIONS"]puts "Running turbo_rspec (seed: #{seed}) using files in: #{files}"puts "::endgroup::" if ENV["GITHUB_ACTIONS"]