Merge branch '56040-coverage-is-always-100' into 'master'

Resolve "Coverage is always 100%"

Closes #56040

See merge request gitlab-org/gitlab-ce!24231
This commit is contained in:
Lin Jen-Shin 2019-01-09 09:51:40 +00:00
commit ca5d6d841a

View file

@ -1,5 +1,6 @@
require 'simplecov'
require 'active_support/core_ext/numeric/time'
require_relative '../lib/gitlab/utils'
module SimpleCovEnv
extend self
@ -16,8 +17,9 @@ module SimpleCovEnv
def configure_job
SimpleCov.configure do
if ENV['CI_JOB_NAME']
coverage_dir "coverage/#{ENV['CI_JOB_NAME']}"
command_name ENV['CI_JOB_NAME']
job_name = Gitlab::Utils.slugify(ENV['CI_JOB_NAME'])
coverage_dir "coverage/#{job_name}"
command_name job_name
end
if ENV['CI']