up: adds converage
parent
b23b61bc67
commit
2f8f719fc4
|
@ -39,10 +39,28 @@ jobs:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
|
|
||||||
- name: Runs tests
|
- name: Runs tests
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
COVERAGE: true
|
||||||
|
MINIMUM_COVERAGE: 80
|
||||||
|
|
||||||
run: bundle exec rake spec
|
run: bundle exec rake spec
|
||||||
|
|
||||||
- name: Runs tests with config enabled
|
- name: Runs tests with config enabled
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
COVERAGE: true
|
||||||
|
MINIMUM_COVERAGE: 80
|
||||||
|
|
||||||
run: bundle exec rake spec_config
|
run: bundle exec rake spec_config
|
||||||
|
|
||||||
- name: Runs tests with config enabled for extra scopes
|
- name: Runs tests with config enabled for extra scopes
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
COVERAGE: true
|
||||||
|
MINIMUM_COVERAGE: 80
|
||||||
|
|
||||||
run: bundle exec rake spec_config_with_extra_scopes
|
run: bundle exec rake spec_config_with_extra_scopes
|
||||||
|
|
10
Gemfile.lock
10
Gemfile.lock
|
@ -32,6 +32,8 @@ GEM
|
||||||
tzinfo (~> 2.0)
|
tzinfo (~> 2.0)
|
||||||
ast (2.4.2)
|
ast (2.4.2)
|
||||||
builder (3.2.4)
|
builder (3.2.4)
|
||||||
|
codecov (0.6.0)
|
||||||
|
simplecov (>= 0.15, < 0.22)
|
||||||
concurrent-ruby (1.1.10)
|
concurrent-ruby (1.1.10)
|
||||||
crass (1.0.6)
|
crass (1.0.6)
|
||||||
database_cleaner (2.0.1)
|
database_cleaner (2.0.1)
|
||||||
|
@ -41,6 +43,7 @@ GEM
|
||||||
database_cleaner-core (~> 2.0.0)
|
database_cleaner-core (~> 2.0.0)
|
||||||
database_cleaner-core (2.0.1)
|
database_cleaner-core (2.0.1)
|
||||||
diff-lcs (1.5.0)
|
diff-lcs (1.5.0)
|
||||||
|
docile (1.4.0)
|
||||||
erubi (1.10.0)
|
erubi (1.10.0)
|
||||||
factory_bot (6.2.1)
|
factory_bot (6.2.1)
|
||||||
activesupport (>= 5.0.0)
|
activesupport (>= 5.0.0)
|
||||||
|
@ -122,6 +125,12 @@ GEM
|
||||||
ruby-progressbar (1.11.0)
|
ruby-progressbar (1.11.0)
|
||||||
shoulda-matchers (5.1.0)
|
shoulda-matchers (5.1.0)
|
||||||
activesupport (>= 5.2.0)
|
activesupport (>= 5.2.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)
|
||||||
thor (1.2.1)
|
thor (1.2.1)
|
||||||
tzinfo (2.0.4)
|
tzinfo (2.0.4)
|
||||||
concurrent-ruby (~> 1.0)
|
concurrent-ruby (~> 1.0)
|
||||||
|
@ -132,6 +141,7 @@ PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
codecov
|
||||||
database_cleaner
|
database_cleaner
|
||||||
factory_bot_rails
|
factory_bot_rails
|
||||||
mysql2
|
mysql2
|
||||||
|
|
|
@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
|
||||||
|
|
||||||
spec.add_dependency 'activerecord'
|
spec.add_dependency 'activerecord'
|
||||||
|
|
||||||
|
spec.add_development_dependency 'codecov'
|
||||||
spec.add_development_dependency 'database_cleaner'
|
spec.add_development_dependency 'database_cleaner'
|
||||||
spec.add_development_dependency 'factory_bot_rails'
|
spec.add_development_dependency 'factory_bot_rails'
|
||||||
spec.add_development_dependency 'mysql2'
|
spec.add_development_dependency 'mysql2'
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
if ENV.fetch('COVERAGE', 'false') == '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',
|
||||||
|
'/lib/rating/version.rb',
|
||||||
|
'/vendor',
|
||||||
|
]
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue