-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] How can I merge two lcov files into one? #22
Comments
any updates on this? |
@zoras @saimageshvar # frozen_string_literal: true
require "simplecov"
require "simplecov-lcov"
class SimpleCovLcovGenerator
def self.call(base_dir: "./coverage_results")
new(base_dir: base_dir).generate
end
def initialize(base_dir:)
@base_dir = base_dir
end
def generate
configure_lcov_formatter
configure_simple_cov
collate_results
end
private
attr_reader :base_dir
def coverage_results
Dir["#{base_dir}/.resultset.*.json"]
end
def collate_results
SimpleCov.collate(coverage_results, "rails")
end
def configure_lcov_formatter
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
end
end
def configure_simple_cov
SimpleCov.configure do
formatter SimpleCov::Formatter::LcovFormatter
end
end
end
SimpleCovLcovGenerator.call |
I use the npm package lcov-result-merger to merge two lcov files: https://github.com/mweibel/lcov-result-merger |
No description provided.
The text was updated successfully, but these errors were encountered: