Commit 2ec82857 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'alberts-cleanup-env-var' into 'master'

Simplify job variables for rspec minimal job

See merge request gitlab-org/gitlab!69349
parents c5fb7223 1c2bde39
......@@ -21,7 +21,7 @@
.minimal-rspec-tests:
variables:
RSPEC_TESTS_MAPPING_ENABLED: "true"
MINIMAL_RSPEC_ENABLED: "true"
.decomposed-database-rspec:
variables:
......
......@@ -82,7 +82,6 @@ detect-tests:
- .detect-test-base
- .rails:rules:detect-tests
variables:
RSPEC_TESTS_MAPPING_ENABLED: "true"
MATCHED_TESTS_FILE: tmp/matching_tests.txt
detect-tests as-if-foss:
......
......@@ -159,7 +159,7 @@ function rspec_paralellized_job() {
local rspec_args="-Ispec -rspec_helper --color --format documentation --format RspecJunitFormatter --out junit_rspec.xml ${rspec_opts}"
if [[ -n $RSPEC_TESTS_MAPPING_ENABLED ]]; then
if [[ -n $MINIMAL_RSPEC_ENABLED ]]; then
tooling/bin/parallel_rspec --rspec_args "${rspec_args}" --filter "tmp/matching_tests.txt"
else
tooling/bin/parallel_rspec --rspec_args "${rspec_args}"
......
......@@ -22,10 +22,7 @@ changed_files = mr_changes.changes.map { |change| change['new_path'] }
tff = TestFileFinder::FileFinder.new(paths: changed_files).tap do |file_finder|
file_finder.use TestFileFinder::MappingStrategies::PatternMatching.load('tests.yml')
if ENV['RSPEC_TESTS_MAPPING_ENABLED']
file_finder.use TestFileFinder::MappingStrategies::DirectMatching.load_json(ENV['RSPEC_TESTS_MAPPING_PATH'])
end
end
File.write(output_file, tff.test_files.uniq.join(' '))
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment