Fix coverage artifact dir to not include '/'

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-01-08 14:43:19 +01:00
parent 8253a4300e
commit 10da3ddd31
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
1 changed files with 4 additions and 2 deletions

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']