Skip to content

Commit

Permalink
ft: adds codecov support
Browse files Browse the repository at this point in the history
  • Loading branch information
wbotelhos committed Mar 19, 2022
1 parent a4d575e commit 501fe0e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,13 @@ GEM
ast (2.4.2)
builder (3.2.4)
byebug (11.1.3)
codecov (0.6.0)
simplecov (>= 0.15, < 0.22)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crass (1.0.6)
diff-lcs (1.5.0)
docile (1.4.0)
erubi (1.10.0)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
Expand Down Expand Up @@ -116,6 +119,12 @@ GEM
rubocop-rspec (2.9.0)
rubocop (~> 1.19)
ruby-progressbar (1.11.0)
simplecov (0.21.2)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
sqlite3 (1.4.2)
thor (1.2.1)
tzinfo (2.0.4)
Expand All @@ -127,6 +136,7 @@ PLATFORMS
ruby

DEPENDENCIES
codecov
normalizy!
pry-byebug
rspec-rails
Expand Down
1 change: 1 addition & 0 deletions normalizy.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Gem::Specification.new do |spec|

spec.add_dependency 'activerecord', '>= 4.1'

spec.add_development_dependency 'codecov'
spec.add_development_dependency 'pry-byebug'
spec.add_development_dependency 'rspec-rails'
spec.add_development_dependency 'rubocop-performance'
Expand Down
18 changes: 18 additions & 0 deletions spec/support/coverage.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# frozen_string_literal: true

if ENV['COVERAGE'] == 'true'
require 'simplecov'
require 'codecov'

SimpleCov.formatter = SimpleCov::Formatter::Codecov

SimpleCov.minimum_coverage(ENV.fetch('MINIMUM_COVERAGE', 80).to_i)

SimpleCov.start('rails') do
add_filter [
'/lib/generators',
'/vendor',
'/lib/normalizy/version.rb',
]
end
end

0 comments on commit 501fe0e

Please sign in to comment.