mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 05:09:38 +02:00
Add simplecov (#760)
This commit is contained in:
parent
ac46c0c5a9
commit
22e6919eb5
4 changed files with 29 additions and 0 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -53,3 +53,5 @@ compose-dev.yaml
|
|||
|
||||
# Ignore GCP keyfile
|
||||
gcp-storage-keyfile.json
|
||||
|
||||
coverage
|
||||
|
|
1
Gemfile
1
Gemfile
|
@ -71,4 +71,5 @@ group :test do
|
|||
gem "vcr"
|
||||
gem "webmock"
|
||||
gem "climate_control"
|
||||
gem "simplecov", require: false
|
||||
end
|
||||
|
|
|
@ -171,6 +171,7 @@ GEM
|
|||
debug (1.9.2)
|
||||
irb (~> 1.10)
|
||||
reline (>= 0.3.8)
|
||||
docile (1.4.0)
|
||||
dotenv (3.1.2)
|
||||
dotenv-rails (3.1.2)
|
||||
dotenv (= 3.1.2)
|
||||
|
@ -399,6 +400,12 @@ GEM
|
|||
sentry-ruby (5.17.3)
|
||||
bigdecimal
|
||||
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||
simplecov (0.22.0)
|
||||
docile (~> 1.1)
|
||||
simplecov-html (~> 0.11)
|
||||
simplecov_json_formatter (~> 0.1)
|
||||
simplecov-html (0.12.3)
|
||||
simplecov_json_formatter (0.1.4)
|
||||
smart_properties (1.17.0)
|
||||
sorbet-runtime (0.5.11383)
|
||||
stackprof (0.2.26)
|
||||
|
@ -493,6 +500,7 @@ DEPENDENCIES
|
|||
selenium-webdriver
|
||||
sentry-rails
|
||||
sentry-ruby
|
||||
simplecov
|
||||
stackprof
|
||||
stimulus-rails
|
||||
tailwindcss-rails
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
if ENV["COVERAGE"]
|
||||
require "simplecov"
|
||||
SimpleCov.start "rails" do
|
||||
enable_coverage :branch
|
||||
end
|
||||
end
|
||||
|
||||
# Test ENV setup:
|
||||
# By default, all features should be disabled
|
||||
# Use the `with_env_overrides` helper to enable features for individual tests
|
||||
|
@ -28,6 +35,17 @@ module ActiveSupport
|
|||
# Run tests in parallel with specified workers
|
||||
parallelize(workers: :number_of_processors)
|
||||
|
||||
# https://github.com/simplecov-ruby/simplecov/issues/718#issuecomment-538201587
|
||||
if ENV["COVERAGE"]
|
||||
parallelize_setup do |worker|
|
||||
SimpleCov.command_name "#{SimpleCov.command_name}-#{worker}"
|
||||
end
|
||||
|
||||
parallelize_teardown do |worker|
|
||||
SimpleCov.result
|
||||
end
|
||||
end
|
||||
|
||||
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
||||
fixtures :all
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue