Move simplecov
config into rails_helper
(#30302)
This commit is contained in:
parent
aad5e841b5
commit
6beead3867
4 changed files with 44 additions and 26 deletions
|
@ -2,6 +2,31 @@
|
|||
|
||||
ENV['RAILS_ENV'] ||= 'test'
|
||||
|
||||
unless ENV['DISABLE_SIMPLECOV'] == 'true'
|
||||
require 'simplecov'
|
||||
|
||||
SimpleCov.start 'rails' do
|
||||
if ENV['CI']
|
||||
require 'simplecov-lcov'
|
||||
formatter SimpleCov::Formatter::LcovFormatter
|
||||
formatter.config.report_with_single_file = true
|
||||
else
|
||||
formatter SimpleCov::Formatter::HTMLFormatter
|
||||
end
|
||||
|
||||
enable_coverage :branch
|
||||
|
||||
add_filter 'lib/linter'
|
||||
|
||||
add_group 'Libraries', 'lib'
|
||||
add_group 'Policies', 'app/policies'
|
||||
add_group 'Presenters', 'app/presenters'
|
||||
add_group 'Serializers', 'app/serializers'
|
||||
add_group 'Services', 'app/services'
|
||||
add_group 'Validators', 'app/validators'
|
||||
end
|
||||
end
|
||||
|
||||
# This needs to be defined before Rails is initialized
|
||||
STREAMING_PORT = ENV.fetch('TEST_STREAMING_PORT', '4020')
|
||||
ENV['STREAMING_API_BASE_URL'] = "http://localhost:#{STREAMING_PORT}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue