From e7c1be99417c09ec7b30fbf2993fcd6fec77c984 Mon Sep 17 00:00:00 2001 From: Sina Eftekhar Date: Fri, 11 Aug 2023 12:54:34 +0300 Subject: [PATCH] Update simplecov/codecov configuration --- .github/workflows/ci_ratonvirus.yml | 2 +- .simplecov | 5 ++ Gemfile | 2 +- Gemfile.lock | 132 ++++++++++++++-------------- spec/spec_helper.rb | 6 +- 5 files changed, 74 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci_ratonvirus.yml b/.github/workflows/ci_ratonvirus.yml index f243c87..4c58b88 100644 --- a/.github/workflows/ci_ratonvirus.yml +++ b/.github/workflows/ci_ratonvirus.yml @@ -8,7 +8,7 @@ on: pull_request: env: - CODECOV: "true" + CI: "true" concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} diff --git a/.simplecov b/.simplecov index 7fe053c..9f7bb92 100644 --- a/.simplecov +++ b/.simplecov @@ -9,3 +9,8 @@ end SimpleCov.command_name ENV["COMMAND_NAME"] || File.basename(Dir.pwd) SimpleCov.merge_timeout 1800 + +if ENV["CI"] + require "simplecov-cobertura" + SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter +end diff --git a/Gemfile b/Gemfile index edf7b9c..e95ee56 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ group :development, :test do end group :test do - gem "codecov", require: false + gem "simplecov-cobertura" end gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 610909e..de9dad3 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -7,44 +7,44 @@ PATH GEM remote: https://rubygems.org/ specs: - actionpack (7.0.2.3) - actionview (= 7.0.2.3) - activesupport (= 7.0.2.3) - rack (~> 2.0, >= 2.2.0) + actionpack (7.0.7) + actionview (= 7.0.7) + activesupport (= 7.0.7) + rack (~> 2.0, >= 2.2.4) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actionview (7.0.2.3) - activesupport (= 7.0.2.3) + actionview (7.0.7) + activesupport (= 7.0.7) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (7.0.2.3) - activesupport (= 7.0.2.3) + activejob (7.0.7) + activesupport (= 7.0.7) globalid (>= 0.3.6) - activemodel (7.0.2.3) - activesupport (= 7.0.2.3) - activerecord (7.0.2.3) - activemodel (= 7.0.2.3) - activesupport (= 7.0.2.3) - activestorage (7.0.2.3) - actionpack (= 7.0.2.3) - activejob (= 7.0.2.3) - activerecord (= 7.0.2.3) - activesupport (= 7.0.2.3) + activemodel (7.0.7) + activesupport (= 7.0.7) + activerecord (7.0.7) + activemodel (= 7.0.7) + activesupport (= 7.0.7) + activestorage (7.0.7) + actionpack (= 7.0.7) + activejob (= 7.0.7) + activerecord (= 7.0.7) + activesupport (= 7.0.7) marcel (~> 1.0) mini_mime (>= 1.1.0) - activesupport (7.0.2.3) + activesupport (7.0.7) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) tzinfo (~> 2.0) - addressable (2.8.0) - public_suffix (>= 2.0.2, < 5.0) + addressable (2.8.5) + public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) builder (3.2.4) - carrierwave (2.2.2) + carrierwave (2.2.4) activemodel (>= 5.0.0) activesupport (>= 5.0.0) addressable (~> 2.6) @@ -52,13 +52,11 @@ GEM marcel (~> 1.0.0) mini_mime (>= 0.1.3) ssrf_filter (~> 1.0) - codecov (0.6.0) - simplecov (>= 0.15, < 0.22) concurrent-ruby (1.2.2) crass (1.0.6) diff-lcs (1.5.0) docile (1.4.0) - erubi (1.10.0) + erubi (1.12.0) ffi (1.15.5) globalid (1.1.0) activesupport (>= 5.0) @@ -72,50 +70,50 @@ GEM nokogiri (>= 1.12.0) marcel (1.0.2) method_source (1.0.0) - mini_magick (4.11.0) - mini_mime (1.1.2) - mini_portile2 (2.8.2) - minitest (5.18.1) - nokogiri (1.15.2) - mini_portile2 (~> 2.8.2) + mini_magick (4.12.0) + mini_mime (1.1.5) + minitest (5.19.0) + nokogiri (1.15.3-x86_64-linux) racc (~> 1.4) - parallel (1.21.0) - parser (3.1.1.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) - public_suffix (4.0.6) + racc + public_suffix (5.0.3) racc (1.7.1) - rack (2.2.7) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rails-dom-testing (2.0.3) - activesupport (>= 4.2.0) + rack (2.2.8) + rack-test (2.1.0) + rack (>= 1.3) + rails-dom-testing (2.2.0) + activesupport (>= 5.0.0) + minitest nokogiri (>= 1.6) rails-html-sanitizer (1.6.0) loofah (~> 2.21) nokogiri (~> 1.14) - railties (7.0.2.3) - actionpack (= 7.0.2.3) - activesupport (= 7.0.2.3) + railties (7.0.7) + actionpack (= 7.0.7) + activesupport (= 7.0.7) method_source rake (>= 12.2) thor (~> 1.0) zeitwerk (~> 2.5) rainbow (3.1.1) rake (13.0.6) - regexp_parser (2.2.1) - rexml (3.2.5) - rspec (3.11.0) - rspec-core (~> 3.11.0) - rspec-expectations (~> 3.11.0) - rspec-mocks (~> 3.11.0) - rspec-core (3.11.0) - rspec-support (~> 3.11.0) - rspec-expectations (3.11.0) + regexp_parser (2.8.1) + rexml (3.2.6) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) - rspec-mocks (3.11.0) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.6) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.11.0) + rspec-support (~> 3.12.0) rspec-rails (4.1.2) actionpack (>= 4.2) activesupport (>= 4.2) @@ -124,7 +122,7 @@ GEM rspec-expectations (~> 3.10) rspec-mocks (~> 3.10) rspec-support (~> 3.10) - rspec-support (3.11.0) + rspec-support (3.12.1) rubocop (1.11.0) parallel (~> 1.10) parser (>= 3.0.0.0) @@ -134,34 +132,35 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.16.0) - parser (>= 3.1.1.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) rubocop-rspec (2.2.0) rubocop (~> 1.0) rubocop-ast (>= 1.1.0) - ruby-progressbar (1.11.0) + ruby-progressbar (1.13.0) ruby-vips (2.1.4) ffi (~> 1.12) simplecov (0.18.5) docile (~> 1.1) simplecov-html (~> 0.11) + simplecov-cobertura (1.4.2) + simplecov (~> 0.8) simplecov-html (0.12.3) - sqlite3 (1.4.2) - ssrf_filter (1.0.7) - thor (1.2.1) + sqlite3 (1.6.3-x86_64-linux) + ssrf_filter (1.1.1) + thor (1.2.2) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - unicode-display_width (2.1.0) - zeitwerk (2.5.4) + unicode-display_width (2.4.2) + zeitwerk (2.6.11) PLATFORMS - ruby + x86_64-linux DEPENDENCIES activemodel (~> 7.0) activestorage (~> 7.0) carrierwave (~> 2.1) - codecov rake (~> 13.0) ratonvirus! rspec (~> 3.0) @@ -169,7 +168,8 @@ DEPENDENCIES rubocop (~> 1.11.0) rubocop-rspec (~> 2.2.0) simplecov (~> 0.18.0) + simplecov-cobertura sqlite3 (~> 1.4) BUNDLED WITH - 2.3.5 + 2.2.19 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index ca58cb6..9eaa281 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,10 +1,6 @@ # frozen_string_literal: true -require "simplecov" if ENV["SIMPLECOV"] || ENV["CODECOV"] -if ENV["CODECOV"] - require "codecov" - SimpleCov.formatter = SimpleCov::Formatter::Codecov -end +require "simplecov" require "ratonvirus"