Skip to content

Commit

Permalink
Fix code coverage report to codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoocasali committed May 7, 2024
1 parent 8e8b5f8 commit 30d5ed0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,9 @@ jobs:
run: bundle exec rspec
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
if: matrix.ruby-version == '3.1' && matrix.rails-version == '7.0'
with:
token: ${{ secrets.CODECOV_TOKEN }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

linter_check:
name: linter-check
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ group :test do
gem 'jdbc-sqlite3', platform: :jruby
gem 'rspec', '~> 3.0'
gem 'simplecov', require: 'false'
gem 'codecov', require: 'false'
gem 'simplecov-cobertura', require: 'false'
gem 'threads'

gem 'byebug'
Expand Down
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.7"

volumes:
bundle:
play_bundle:
Expand Down
7 changes: 5 additions & 2 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

unless ENV.fetch('DISABLE_COVERAGE', false)
require 'simplecov'
require 'codecov'

SimpleCov.start do
add_filter %r{^/spec/}
minimum_coverage 86.70

formatter SimpleCov::Formatter::Codecov if ENV['CI']
if ENV['CI']
require 'simplecov-cobertura'

formatter SimpleCov::Formatter::CoberturaFormatter
end
end
end

Expand Down

0 comments on commit 30d5ed0

Please sign in to comment.