Skip to content

Commit

Permalink
fix missing codecov formatter/circular reference problem
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Apr 19, 2021
1 parent 8c4ccfc commit 60be542
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
7 changes: 1 addition & 6 deletions .simplecov
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
7 changes: 6 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down

0 comments on commit 60be542

Please sign in to comment.