From d3cb44a800defbd376b74a7357dbac6c47f2cb2d Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:00:12 -0700 Subject: [PATCH 1/9] Update codecov token --- codecov.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/codecov.yml b/codecov.yml index c6e5dff8..8c43af93 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,2 +1,4 @@ ignore: - "spec/**/*" +codecov: +token: ${{ secrets.CODECOV_TOKEN }} From 89fe8e20c7284174d0d89ae43ba632fb69c991bd Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:03:06 -0700 Subject: [PATCH 2/9] Trying another format --- codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codecov.yml b/codecov.yml index 8c43af93..2af45be3 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,4 @@ ignore: - "spec/**/*" codecov: -token: ${{ secrets.CODECOV_TOKEN }} +token: ${ secrets.CODECOV_TOKEN } From 18fc214d1b87fd46e1e1074f4bdbfd22b8151c9f Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:13:50 -0700 Subject: [PATCH 3/9] Add codecov gh action to replace per-test upload --- .github/workflows/ruby.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 02d2de17..e6028362 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 }} From c1b795126dd8edfb6594b82036dc75c467b3e32f Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:18:46 -0700 Subject: [PATCH 4/9] Remove deprecated codecov uploader --- spec/spec_helper.rb | 6 ------ 1 file changed, 6 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index b1d84358..d4ebab3d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true -# https://github.com/codecov/codecov-ruby#usage -require 'simplecov' -SimpleCov.start -require 'codecov' -SimpleCov.formatter = SimpleCov::Formatter::Codecov - require 'segment/analytics' require 'active_support/time' From 08e2049b48e278a0ffada1e99856982e013a3e4a Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:19:48 -0700 Subject: [PATCH 5/9] Removing codecov dependency, using GH actions instead --- analytics-ruby.gemspec | 1 - 1 file changed, 1 deletion(-) diff --git a/analytics-ruby.gemspec b/analytics-ruby.gemspec index aad35538..b45b31d0 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 From a77c1f30f330f8844a9f4c46dac71b78e5883d72 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:40:08 -0700 Subject: [PATCH 6/9] Adding new codecov depenencies --- Gemfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Gemfile b/Gemfile index 817f62a8..d54fb9a2 100644 --- a/Gemfile +++ b/Gemfile @@ -1,2 +1,5 @@ source 'http://rubygems.org' gemspec + +gem 'simplecov' +gem 'simplecov-cobertura' From a0f577f55f14b34a0482d6553d43ea55efde1915 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:43:02 -0700 Subject: [PATCH 7/9] Adding new cov formatter --- spec/spec_helper.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d4ebab3d..20f77995 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,5 +1,10 @@ # frozen_string_literal: true +require "simplecov" +SimpleCov.start +require 'simplecov-cobertura' +SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter + require 'segment/analytics' require 'active_support/time' From fbe081bfe1270b9ce840562b6ff398467ad5d1d1 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:46:11 -0700 Subject: [PATCH 8/9] Fixing nit from codecov's tutorial code --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 20f77995..8dc8634c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -require "simplecov" +require 'simplecov' SimpleCov.start require 'simplecov-cobertura' SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter From 42d4dd8381d349879dc43e9d2ef0b2824a1807b7 Mon Sep 17 00:00:00 2001 From: Michael Grosse Huelsewiesche Date: Wed, 1 May 2024 14:50:01 -0700 Subject: [PATCH 9/9] Codecov says commit yaml was invalid, reverting? --- codecov.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/codecov.yml b/codecov.yml index 2af45be3..c6e5dff8 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,4 +1,2 @@ ignore: - "spec/**/*" -codecov: -token: ${ secrets.CODECOV_TOKEN }