diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e990d61dc..635f94489 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -59,5 +59,10 @@ jobs: - name: Run tests run: bundle exec rspec + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_ORG_TOKEN }} + # - name: Run tests # run: bundle exec rubocop diff --git a/Gemfile b/Gemfile index 0d865053a..1139e7935 100644 --- a/Gemfile +++ b/Gemfile @@ -10,6 +10,7 @@ group 'test' do gem 'overcommit' gem 'codecov', require: false gem 'simplecov', require: false + gem 'simplecov-cobertura', require: false gem 'simplecov-html', require: false gem 'its' gem 'test-unit' diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index efd223d01..984b12991 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -9,8 +9,10 @@ add_filter 'spec' end if ENV['CI'] == 'true' - require 'codecov' - SimpleCov.formatter = SimpleCov::Formatter::Codecov + # require 'codecov' + # SimpleCov.formatter = SimpleCov::Formatter::Codecov + require 'simplecov-cobertura' + SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter end # To run it manually via Rake