diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-06-30 19:04:00 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2016-07-21 12:44:24 +0200 |
commit | 070a96f54faac289d9254f0e8735f3926418335c (patch) | |
tree | 4ee7b4b0d3192ee63081c7b54bed19748683d647 /spec/simplecov_env.rb | |
parent | 8cc7a2dd6f201019d6848aade74d938db356cc39 (diff) | |
download | gitlab-ce-070a96f54faac289d9254f0e8735f3926418335c.tar.gz |
Update configuration of SimpleCov
Diffstat (limited to 'spec/simplecov_env.rb')
-rw-r--r-- | spec/simplecov_env.rb | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/spec/simplecov_env.rb b/spec/simplecov_env.rb index a833255d407..956476fd065 100644 --- a/spec/simplecov_env.rb +++ b/spec/simplecov_env.rb @@ -1,18 +1,27 @@ -if ENV['SIMPLECOV'] - require 'simplecov' +require 'simplecov' - SimpleCov.start :rails do - if ENV['CI_BUILD_NAME'] - coverage_dir "coverage/#{ENV['CI_BUILD_NAME']}" - command_name ENV['CI_BUILD_NAME'] - merge_timeout 7200 - end +SimpleCov.configure do + load_profile :rails - add_filter '/vendor/ruby/' + if ENV['CI_BUILD_NAME'] + coverage_dir "coverage/#{ENV['CI_BUILD_NAME']}" + command_name ENV['CI_BUILD_NAME'] + end - add_group 'Services', 'app/services' - add_group 'Finders', 'app/finders' - add_group 'Uploaders', 'app/uploaders' - add_group 'Validators', 'app/validators' + if ENV['CI'] + SimpleCov.at_exit do + # In CI environment don't generate formatted reports + # Only generate .resultset.json + SimpleCov.result + end end + + add_filter '/vendor/ruby/' + + add_group 'Services', 'app/services' + add_group 'Finders', 'app/finders' + add_group 'Uploaders', 'app/uploaders' + add_group 'Validators', 'app/validators' + + merge_timeout 7200 end |