-
Notifications
You must be signed in to change notification settings - Fork 22
/
.simplecov
32 lines (27 loc) · 1 KB
/
.simplecov
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true
if ENV["SIMPLECOV"]
SimpleCov.start do
# `ENGINE_ROOT` holds the name of the engine we are testing.
# This brings us to the main Decidim folder.
root ENV.fetch("ENGINE_ROOT", nil)
# We make sure we track all Ruby files, to avoid skipping unrequired files
# We need to include the `../` section, otherwise it only tracks files from the
# `ENGINE_ROOT` folder for some reason.
track_files "**/*.rb"
# We ignore some of the files because they are never tested
add_filter "/config/"
add_filter "/db/"
add_filter "/vendor/"
add_filter "/spec/"
add_filter "/test/"
add_filter %r{^/lib/decidim/[^/]*/engine.rb}
add_filter %r{^/lib/decidim/[^/]*/admin_engine.rb}
add_filter %r{^/lib/decidim/[^/]*/component.rb}
add_filter %r{^/lib/decidim/[^/]*/participatory_space.rb}
end
SimpleCov.merge_timeout 1800
if ENV["CI"]
require "simplecov-cobertura"
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter
end
end