From b2840aaebfd2ad39e328fcc707589d34856c1c74 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Wed, 31 Mar 2021 09:21:46 +0200 Subject: [PATCH] Enable coverage in CI and use Codecov formatter --- .github/workflows/build.yml | 1 + .simplecov | 3 +++ Gemfile | 1 + Gemfile.lock | 3 +++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f49f389d1..cd38d3c590 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ on: env: DISABLE_KNAPSACK: true TIMEZONE: UTC + COVERAGE: true jobs: test-controllers-and-serializers: diff --git a/.simplecov b/.simplecov index ed6f826b48..f508e4b61f 100644 --- a/.simplecov +++ b/.simplecov @@ -16,3 +16,6 @@ SimpleCov.start 'rails' do add_filter '/log' add_filter '/db' end + +require 'codecov' +SimpleCov.formatter = SimpleCov::Formatter::Codecov diff --git a/Gemfile b/Gemfile index a529d9c0ed..0b69e23018 100644 --- a/Gemfile +++ b/Gemfile @@ -141,6 +141,7 @@ group :test, :development do end group :test do + gem 'codecov', require: false gem 'simplecov', require: false gem 'test-prof' gem 'webmock' diff --git a/Gemfile.lock b/Gemfile.lock index 41b0c72cf3..e913549cd2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -152,6 +152,8 @@ GEM climate_control (0.2.0) cocaine (0.5.8) climate_control (>= 0.0.3, < 1.0) + codecov (0.5.1) + simplecov (>= 0.15, < 0.22) coderay (1.1.3) coffee-rails (4.2.2) coffee-script (>= 2.2.0) @@ -618,6 +620,7 @@ DEPENDENCIES cancancan (~> 1.15.0) capybara catalog! + codecov coffee-rails (~> 4.2.2) combine_pdf compass-rails