DEV: Support RUN_SYSTEM_TESTS and SINGLE_PLUGIN in docker test task (#24040)

Previously, RUN_SYSTEM_TESTS would run system tests of all plugins. This commit makes it respect the SINGLE_PLUGIN env if it's set.
This commit is contained in:
David Taylor 2023-10-23 00:41:21 +01:00 committed by GitHub
parent 8fd6d9f66b
commit c06b308895
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 7 deletions

View File

@ -240,17 +240,22 @@ task "docker:test" do
unless ENV["SKIP_PLUGINS"]
if ENV["SINGLE_PLUGIN"]
@good &&= run_or_fail("bundle exec rake plugin:spec['#{ENV["SINGLE_PLUGIN"]}']")
if ENV["RUN_SYSTEM_TESTS"]
@good &&=
run_or_fail(
"LOAD_PLUGINS=1 timeout --verbose 1600 bundle exec rspec plugins/#{ENV["SINGLE_PLUGIN"]}/spec/system".strip,
)
end
else
fail_fast = "RSPEC_FAILFAST=1" unless ENV["SKIP_FAILFAST"]
task = ENV["USE_TURBO"] ? "plugin:turbo_spec" : "plugin:spec"
@good &&= run_or_fail("#{fail_fast} bundle exec rake #{task}")
end
if ENV["RUN_SYSTEM_TESTS"]
@good &&=
run_or_fail(
"LOAD_PLUGINS=1 timeout --verbose 1600 bundle exec rspec plugins/*/spec/system".strip,
)
if ENV["RUN_SYSTEM_TESTS"]
@good &&=
run_or_fail(
"LOAD_PLUGINS=1 timeout --verbose 1600 bundle exec rspec plugins/*/spec/system".strip,
)
end
end
end
end