I have a rails application that runs parallel_test with rspec inside circleci
Looking around on Internet I added up this to the very beginnging of my spec_helper.rb
file:
if ENV['COVERAGE']
require 'simplecov'
# on circleci change the output dir to the artifacts
if ENV['CIRCLE_ARTIFACTS']
dir = File.join("..", "..", "..", ENV['CIRCLE_ARTIFACTS'], "coverage")
SimpleCov.coverage_dir(dir)
SimpleCov.merge_timeout 3600
SimpleCov.command_name "rspec_#{Process.pid.to_s}#{ENV['TEST_ENV_NUMBER']}"
end
SimpleCov.start 'rails'
end
The problem is that as a result I get different folders one for each circleci instance:
What am I doing wrong ?