diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 03d98ef5e8..89b833499f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -86,6 +86,11 @@ jobs: git show --no-patch # the commit being tested (which is often a merge due to actions/checkout@v3) bin/rake knapsack_pro:rspec + - name: Check code coverage changes + + run: | + bundle exec undercover --compare origin/master + models: runs-on: ubuntu-22.04 services: @@ -145,6 +150,11 @@ jobs: run: | bin/rake knapsack_pro:rspec + - name: Check code coverage changes + + run: | + bundle exec undercover --compare origin/master + system_admin: runs-on: ubuntu-22.04 services: @@ -222,6 +232,11 @@ jobs: path: tmp/capybara/screenshots/*.png retention-days: 7 if-no-files-found: ignore + + - name: Check code coverage changes + + run: | + bundle exec undercover --compare origin/master system_consumer: runs-on: ubuntu-22.04 diff --git a/Gemfile.lock b/Gemfile.lock index cb715b4d5c..94f092e648 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -974,7 +974,6 @@ DEPENDENCIES sidekiq sidekiq-scheduler simplecov - simplecov-html simplecov-lcov spreadsheet_architect spring diff --git a/spec/base_spec_helper.rb b/spec/base_spec_helper.rb index 0a2cf06ee4..12e0905cf0 100644 --- a/spec/base_spec_helper.rb +++ b/spec/base_spec_helper.rb @@ -7,9 +7,10 @@ ENV["RAILS_ENV"] ||= 'test' require 'simplecov' if ENV["COVERAGE"] require 'simplecov-lcov' SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ - SimpleCov::Formatter::LcovFormatter, -]) +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter. + new([ + SimpleCov::Formatter::LcovFormatter, + ]) require 'undercover' require 'rubygems'