Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds undercover gem to the stack #13101

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,3 +570,7 @@ jobs:
retention-days: 7
if-no-files-found: ignore
include-hidden-files: true
- name: Compare SimpleCov results with Undercover
env:
RAILS_ENV: test
run: bundle exec undercover --compare origin/master
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ group :test do
gem 'pdf-reader'
gem 'rails-controller-testing'
gem 'simplecov', require: false
gem 'simplecov-lcov', require: false
gem 'undercover', require: false
gem 'vcr', require: false
gem 'webmock', require: false
# See spec/spec_helper.rb for instructions
Expand Down
11 changes: 11 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ GEM
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
imagen (0.2.0)
parser (>= 2.5, != 2.5.1.1)
immigrant (0.3.6)
activerecord (>= 3.0)
invisible_captcha (2.3.0)
Expand Down Expand Up @@ -704,6 +706,7 @@ GEM
rubyzip (2.3.2)
rufus-scheduler (3.8.2)
fugit (~> 1.1, >= 1.1.6)
rugged (1.7.2)
sanitize (6.1.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand Down Expand Up @@ -732,6 +735,7 @@ GEM
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov-lcov (0.8.0)
simplecov_json_formatter (0.1.4)
spreadsheet_architect (5.0.0)
caxlsx (>= 3.3.0, < 4)
Expand Down Expand Up @@ -790,6 +794,11 @@ GEM
turbo-rails (>= 1.3.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
undercover (0.6.3)
bigdecimal
imagen (>= 0.2.0)
rainbow (>= 2.1, < 4.0)
rugged (>= 0.27, < 1.8)
unicode-display_width (2.5.0)
uniform_notifier (1.16.0)
uri (0.13.0)
Expand Down Expand Up @@ -965,6 +974,7 @@ DEPENDENCIES
sidekiq
sidekiq-scheduler
simplecov
simplecov-lcov
spreadsheet_architect
spring
spring-commands-rspec
Expand All @@ -977,6 +987,7 @@ DEPENDENCIES
timecop
turbo-rails
turbo_power
undercover
valid_email2
validates_lengths_from_database
vcr
Expand Down
9 changes: 9 additions & 0 deletions spec/base_spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@

# for full configuration, see .simplecov
require 'simplecov' if ENV["COVERAGE"]
require 'simplecov-lcov' if ENV["COVERAGE"]
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start do
add_filter(/^\/spec\//) # For RSpec

Check warning on line 13 in spec/base_spec_helper.rb

View workflow job for this annotation

GitHub Actions / runner / rubocop

[rubocop] reported by reviewdog 🐶 Use `%r` around regular expression. Raw Output: spec/base_spec_helper.rb:13:14: C: Style/RegexpLiteral: Use `%r` around regular expression.
enable_coverage(:branch) # Report branch coverage to trigger branch-level undercover warnings
end

require 'undercover' if ENV["COVERAGE"]

require 'pry' unless ENV['CI']
require 'view_component/test_helpers'
Expand Down
Loading