From b61f9b28f62351b45271a15b670d48f2f77a04b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Verg=C3=A9s?= Date: Mon, 23 Oct 2023 12:59:52 +0200 Subject: [PATCH] update codecov report --- .github/workflows/test_integration.yml | 2 +- .github/workflows/test_unit.yml | 2 +- .ruby-version | 2 +- .simplecov | 23 ++++++++++++++--------- Gemfile.lock | 2 +- spec/spec_helper.rb | 7 ------- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_integration.yml b/.github/workflows/test_integration.yml index cf885307..2864a2a5 100644 --- a/.github/workflows/test_integration.yml +++ b/.github/workflows/test_integration.yml @@ -8,7 +8,7 @@ on: env: CI: "true" - CODECOV: "true" + SIMPLECOV: "true" RUBY_VERSION: 3.0.5 NODE_VERSION: 16.9.1 RAILS_ENV: test diff --git a/.github/workflows/test_unit.yml b/.github/workflows/test_unit.yml index 8e9e14a3..a95d3fc8 100644 --- a/.github/workflows/test_unit.yml +++ b/.github/workflows/test_unit.yml @@ -8,7 +8,7 @@ on: env: CI: "true" - CODECOV: "true" + SIMPLECOV: "true" RUBY_VERSION: 3.0.5 NODE_VERSION: 16.9.1 diff --git a/.ruby-version b/.ruby-version index 7da3c168..8ffc1ad6 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.0.5 \ No newline at end of file +3.0.6 \ No newline at end of file diff --git a/.simplecov b/.simplecov index 448ba073..ee7c8e96 100644 --- a/.simplecov +++ b/.simplecov @@ -1,13 +1,18 @@ # frozen_string_literal: true -SimpleCov.start do - root ENV.fetch("ENGINE_ROOT", nil) +if ENV["SIMPLECOV"] + SimpleCov.start do + # We ignore some of the files because they are never tested + add_filter "/config/" + add_filter "/db/" + add_filter "lib/decidim/reporting_proposals/version.rb" + add_filter "/spec" + end - add_filter "lib/decidim/reporting_proposals/version.rb" - add_filter "lib/decidim/reporting_proposals/component.rb" - add_filter "/spec" -end - -SimpleCov.command_name ENV.fetch("COMMAND_NAME", nil) || File.basename(Dir.pwd) + SimpleCov.merge_timeout 1800 -SimpleCov.merge_timeout 1800 + if ENV["CI"] + require "simplecov-cobertura" + SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter + end +end diff --git a/Gemfile.lock b/Gemfile.lock index 47ce1d7a..07b23811 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -873,7 +873,7 @@ DEPENDENCIES web-console RUBY VERSION - ruby 3.0.5p211 + ruby 3.0.6p216 BUNDLED WITH 2.3.20 diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 24fdc469..932eabb3 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -2,13 +2,6 @@ require "decidim/dev" -require "simplecov" -SimpleCov.start "rails" -if ENV["CODECOV"] - require "codecov" - SimpleCov.formatter = SimpleCov::Formatter::Codecov -end - ENV["ENGINE_ROOT"] = File.dirname(__dir__) Decidim::Dev.dummy_app_path = File.expand_path(File.join(__dir__, "decidim_dummy_app"))