ci: enable simplecov

This commit is contained in:
Colin Darie 2024-04-22 15:02:35 +02:00
parent c52ff5cdeb
commit fa569c8bb4
No known key found for this signature in database
GPG key ID: 8C76CADD40253590
5 changed files with 42 additions and 0 deletions

1
.gitignore vendored
View file

@ -29,6 +29,7 @@ yarn-debug.log*
/public/assets
/spec/support/spec_config.local.rb
/config/initializers/config.local.rb
/coverage
# Local Netlify folder
.netlify

23
.simplecov Normal file
View file

@ -0,0 +1,23 @@
# frozen_string_literal: true
SimpleCov.start "rails" do
enable_coverage :branch
command_name "RSpec process #{Process.pid}"
formatter SimpleCov::Formatter::MultiFormatter.new([
SimpleCov::Formatter::SimpleFormatter,
SimpleCov::Formatter::HTMLFormatter
])
add_filter "/channels/" # not used
groups.delete("Channels")
add_group "Components", "app/components"
add_group "API", ["app/graphql", "app/serializers"]
add_group "Manager", ["app/dashboards", "app/fields"]
add_group "Models", ["app/models", "app/validators"]
add_group "Policies", "app/policies"
add_group "Services", "app/services"
add_group "Tasks", ["app/tasks", "lib/tasks"]
end

View file

@ -125,6 +125,8 @@ group :test do
gem 'selenium-devtools'
gem 'selenium-webdriver'
gem 'shoulda-matchers', require: false
gem 'simplecov', require: false
gem 'simplecov-cobertura', require: false
gem 'timecop'
gem 'vcr'
gem 'webmock'

View file

@ -223,6 +223,7 @@ GEM
diff-lcs (1.5.1)
discard (1.3.0)
activerecord (>= 4.2, < 8)
docile (1.4.0)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
@ -728,6 +729,15 @@ GEM
simple_xlsx_reader (1.0.4)
nokogiri
rubyzip
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-cobertura (2.1.0)
rexml
simplecov (~> 0.19)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
simpleidn (0.2.1)
unf (~> 0.1.4)
sinatra (3.2.0)
@ -991,6 +1001,8 @@ DEPENDENCIES
sidekiq
sidekiq-cron
simple_xlsx_reader
simplecov
simplecov-cobertura
skylight
spreadsheet_architect
spring

View file

@ -16,6 +16,10 @@
# users commonly want.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
#
#
require 'simplecov' # see config in .simplecov file
require 'rspec/retry'
SECURE_PASSWORD = 'my-s3cure-p4ssword'