diff --git a/.simplecov b/.simplecov index d5335c193..8e9c40ee2 100644 --- a/.simplecov +++ b/.simplecov @@ -1,12 +1,7 @@ # frozen_string_literal: true SimpleCov.start do - if ENV['RUN_CODECOV'] == 'true' - require 'codecov' unless ENV['TRAVIS'] - SimpleCov.formatter = SimpleCov::Formatter::Codecov - elsif ENV['SILENT_SIMPLECOV'] == 'true' - SimpleCov.formatter = SimpleCov::Formatter::SimpleFormatter - end + SimpleCov.formatter = SimpleCov::Formatter::SimpleFormatter if ENV['SILENT_SIMPLECOV'] == 'true' SimpleCov.command_name "Task##{$PROCESS_ID}" SimpleCov.merge_timeout 20 add_group 'Core', %w[lib/pagy.rb lib/pagy/countless.rb lib/pagy/backend.rb lib/pagy/frontend.rb lib/pagy/exceptions.rb] diff --git a/test/test_helper.rb b/test/test_helper.rb index 966659c4b..6111207f8 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -2,7 +2,12 @@ $VERBOSE = {'false' => false, 'true' => true}[ENV['VERBOSE']] if ENV['VERBOSE'] -require 'simplecov' +if ENV['RUN_CODECOV'] + require 'codecov' # requires also simplecov + SimpleCov.formatter = SimpleCov::Formatter::Codecov +else + require 'simplecov' +end $LOAD_PATH.unshift File.expand_path('../lib', __dir__)