set approriate coverage key, use it as command

This commit is contained in:
HoneyryderChuck 2025-04-13 01:08:18 +01:00
parent 44a2041ea8
commit 1b39bcd3a3
2 changed files with 2 additions and 2 deletions

View File

@ -111,7 +111,7 @@ regression tests:
variables:
BUNDLE_WITHOUT: lint:assorted
CI: 1
COVERAGE_KEY: "$RUBY_ENGINE-$RUBY_VERSION-regression-tests"
COVERAGE_KEY: "ruby-3.4-regression-tests"
artifacts:
paths:
- coverage/

View File

@ -4,8 +4,8 @@ GC.auto_compact = true if !defined?(MimeMagic) && GC.respond_to?(:auto_compact=)
if ENV.key?("CI")
require "simplecov"
SimpleCov.command_name "#{RUBY_ENGINE}-#{RUBY_VERSION}"
coverage_key = ENV.fetch("COVERAGE_KEY", "#{RUBY_ENGINE}-#{RUBY_VERSION}")
SimpleCov.command_name coverage_key
SimpleCov.coverage_dir "coverage/#{coverage_key}"
end