From 781a4ba8b45580ea759968c22c5ffcf880330532 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Fri, 1 May 2020 10:13:42 +0200 Subject: [PATCH] Use codecov's bash-based github action --- .github/workflows/retrospring.yml | 5 ++++- Gemfile | 2 +- Gemfile.lock | 15 +++------------ spec/support/simplecov.rb | 6 +++--- 4 files changed, 11 insertions(+), 17 deletions(-) diff --git a/.github/workflows/retrospring.yml b/.github/workflows/retrospring.yml index fc052a12..b1ee1108 100644 --- a/.github/workflows/retrospring.yml +++ b/.github/workflows/retrospring.yml @@ -65,6 +65,9 @@ jobs: - name: Run tests run: bundle exec rake spec env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} POSTGRES_PORT: ${{ job.services.postgres.ports[5432] }} REDIS_URL: "redis://localhost:${{ job.services.redis.ports[6379] }}" + - uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + file: ./coverage/coverage.xml diff --git a/Gemfile b/Gemfile index 2c428619..f06b049a 100644 --- a/Gemfile +++ b/Gemfile @@ -98,7 +98,7 @@ group :development, :test do gem 'poltergeist' gem 'simplecov', require: false gem 'simplecov-json', require: false - gem 'codecov', require: false, git: "https://github.com/timoschilling/codecov-ruby", ref: "add-github-action-support" # watch this space: https://github.com/codecov/codecov-ruby/pull/52 + gem 'simplecov-cobertura', require: false gem 'database_cleaner' gem 'better_errors' gem 'letter_opener' # Use this just in local test environments diff --git a/Gemfile.lock b/Gemfile.lock index 86eb7a73..bf356d05 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,16 +16,6 @@ GIT specs: questiongenerator (0.1.0) -GIT - remote: https://github.com/timoschilling/codecov-ruby - revision: d98380b89acfe4c014aafc50c5ec0b075c32ef7a - ref: add-github-action-support - specs: - codecov (0.1.16) - json - simplecov - url - GEM remote: https://rubygems.org/ remote: https://rails-assets.org/ @@ -454,6 +444,8 @@ GEM simplecov (0.18.5) docile (~> 1.1) simplecov-html (~> 0.11) + simplecov-cobertura (1.3.1) + simplecov (~> 0.8) simplecov-html (0.12.2) simplecov-json (0.2.1) json @@ -500,7 +492,6 @@ GEM unicorn (5.5.4) kgio (~> 2.6) raindrops (~> 0.7) - url (0.3.2) warden (1.2.8) rack (>= 2.0.6) web-console (3.7.0) @@ -527,7 +518,6 @@ DEPENDENCIES brakeman byebug capybara - codecov! coffee-rails (~> 4.1) colorize database_cleaner @@ -583,6 +573,7 @@ DEPENDENCIES sass-rails (~> 5.0) sidekiq (< 6) simplecov + simplecov-cobertura simplecov-json spring (~> 2.0) sweetalert-rails diff --git a/spec/support/simplecov.rb b/spec/support/simplecov.rb index aa93ee94..c07246da 100644 --- a/spec/support/simplecov.rb +++ b/spec/support/simplecov.rb @@ -3,7 +3,7 @@ require "simplecov" SimpleCov.start "rails" -if ENV.key?("CODECOV_TOKEN") - require "codecov" - SimpleCov.formatter = SimpleCov::Formatter::Codecov +if ENV.key?("GITHUB_ACTIONS") + require "simplecov-cobertura" + SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter end