diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 02d2de1..e602836 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -30,3 +30,7 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically - name: Run tests run: bundle exec rake + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.2.0 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/Gemfile b/Gemfile index 817f62a..d54fb9a 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,5 @@ source 'http://rubygems.org' gemspec + +gem 'simplecov' +gem 'simplecov-cobertura' diff --git a/analytics-ruby.gemspec b/analytics-ruby.gemspec index aad3553..b45b31d 100644 --- a/analytics-ruby.gemspec +++ b/analytics-ruby.gemspec @@ -27,5 +27,4 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'oj', '~> 3.6.2' end spec.add_development_dependency 'rubocop', '~> 1.0' - spec.add_development_dependency 'codecov', '~> 0.6' end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b1d8435..8dc8634 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,9 @@ # frozen_string_literal: true -# https://github.com/codecov/codecov-ruby#usage require 'simplecov' SimpleCov.start -require 'codecov' -SimpleCov.formatter = SimpleCov::Formatter::Codecov +require 'simplecov-cobertura' +SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter require 'segment/analytics' require 'active_support/time'