summaryrefslogtreecommitdiff
path: root/spec/simplecov_env.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/simplecov_env.rb')
-rw-r--r--spec/simplecov_env.rb53
1 files changed, 34 insertions, 19 deletions
diff --git a/spec/simplecov_env.rb b/spec/simplecov_env.rb
index c5b8a6db605..17b76205d9e 100644
--- a/spec/simplecov_env.rb
+++ b/spec/simplecov_env.rb
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'simplecov'
+require 'simplecov-cobertura'
require 'active_support/core_ext/numeric/time'
require_relative '../lib/gitlab/utils'
@@ -12,10 +13,19 @@ module SimpleCovEnv
configure_profile
configure_job
+ configure_formatter
SimpleCov.start
end
+ def configure_formatter
+ SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([
+ SimpleCov::Formatter::SimpleFormatter,
+ SimpleCov::Formatter::HTMLFormatter,
+ SimpleCov::Formatter::CoberturaFormatter
+ ])
+ end
+
def configure_job
SimpleCov.configure do
if ENV['CI_JOB_NAME']
@@ -37,28 +47,33 @@ module SimpleCovEnv
def configure_profile
SimpleCov.configure do
load_profile 'test_frameworks'
- track_files '{app,lib}/**/*.rb'
+ track_files '{app,config/initializers,config/initializers_before_autoloader,db/post_migrate,haml_lint,lib,rubocop,tooling}/**/*.rb'
add_filter '/vendor/ruby/'
- add_filter 'app/controllers/sherlock/'
- add_filter 'config/initializers/'
- add_filter 'db/fixtures/'
- add_filter 'lib/gitlab/sidekiq_middleware/'
- add_filter 'lib/system_check/'
+ add_filter '/app/controllers/sherlock/'
+ add_filter '/bin/'
+ add_filter 'db/fixtures/' # Matches EE files as well
+ add_filter '/lib/gitlab/sidekiq_middleware/'
+ add_filter '/lib/system_check/'
- add_group 'Controllers', 'app/controllers'
- add_group 'Finders', 'app/finders'
- add_group 'Helpers', 'app/helpers'
- add_group 'Libraries', 'lib'
- add_group 'Mailers', 'app/mailers'
- add_group 'Models', 'app/models'
- add_group 'Policies', 'app/policies'
- add_group 'Presenters', 'app/presenters'
- add_group 'Serializers', 'app/serializers'
- add_group 'Services', 'app/services'
- add_group 'Uploaders', 'app/uploaders'
- add_group 'Validators', 'app/validators'
- add_group 'Workers', %w(app/jobs app/workers)
+ add_group 'Channels', 'app/channels' # Matches EE files as well
+ add_group 'Controllers', 'app/controllers' # Matches EE files as well
+ add_group 'Finders', 'app/finders' # Matches EE files as well
+ add_group 'GraphQL', 'app/graphql' # Matches EE files as well
+ add_group 'Helpers', 'app/helpers' # Matches EE files as well
+ add_group 'Mailers', 'app/mailers' # Matches EE files as well
+ add_group 'Models', 'app/models' # Matches EE files as well
+ add_group 'Policies', 'app/policies' # Matches EE files as well
+ add_group 'Presenters', 'app/presenters' # Matches EE files as well
+ add_group 'Serializers', 'app/serializers' # Matches EE files as well
+ add_group 'Services', 'app/services' # Matches EE files as well
+ add_group 'Uploaders', 'app/uploaders' # Matches EE files as well
+ add_group 'Validators', 'app/validators' # Matches EE files as well
+ add_group 'Workers', %w[app/jobs app/workers] # Matches EE files as well
+ add_group 'Initializers', %w[config/initializers config/initializers_before_autoloader] # Matches EE files as well
+ add_group 'Migrations', %w[db/migrate db/optional_migrations db/post_migrate] # Matches EE files as well
+ add_group 'Libraries', %w[/lib /ee/lib]
+ add_group 'Tooling', %w[/haml_lint /rubocop /tooling]
merge_timeout 365.days
end