Commit 070a96f5 authored by Kamil Trzcinski's avatar Kamil Trzcinski Committed by Grzegorz Bizon

Update configuration of SimpleCov

parent 8cc7a2dd
......@@ -28,6 +28,7 @@ stages:
- prepare
- test
- post-test
- pages
# Prepare and merge knapsack tests
.knapsack-state: &knapsack-state
......
require_relative Rails.root.join('spec', 'simplecov_env')
SimpleCov.start if ENV['SIMPLECOV']
ENV['RAILS_ENV'] = 'test'
require './config/environment'
......
......@@ -58,8 +58,6 @@ def merged_result
result
end
SimpleCov.configure do
merge_timeout 7200
end
require_relative '../spec/simplecov_env'
merged_result.format!
if ENV['SIMPLECOV']
require 'simplecov'
require 'simplecov'
SimpleCov.configure do
load_profile :rails
SimpleCov.start :rails do
if ENV['CI_BUILD_NAME']
coverage_dir "coverage/#{ENV['CI_BUILD_NAME']}"
command_name ENV['CI_BUILD_NAME']
merge_timeout 7200
end
if ENV['CI']
SimpleCov.at_exit do
# In CI environment don't generate formatted reports
# Only generate .resultset.json
SimpleCov.result
end
end
add_filter '/vendor/ruby/'
......@@ -14,5 +22,6 @@ if ENV['SIMPLECOV']
add_group 'Finders', 'app/finders'
add_group 'Uploaders', 'app/uploaders'
add_group 'Validators', 'app/validators'
end
merge_timeout 7200
end
require_relative 'simplecov_env'
SimpleCov.start if ENV['SIMPLECOV']
ENV["RAILS_ENV"] ||= 'test'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment