From 164b81218a056d35766a949e845d89fd0cd1d39d Mon Sep 17 00:00:00 2001 From: Artur Trzop Date: Thu, 6 Jun 2024 17:16:14 +0200 Subject: [PATCH] update(simplecov docs): How to merge SimpleCov reports from parallel CI nodes --- docusaurus/docs/ruby/simplecov.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docusaurus/docs/ruby/simplecov.md b/docusaurus/docs/ruby/simplecov.md index d075c701..145cba03 100644 --- a/docusaurus/docs/ruby/simplecov.md +++ b/docusaurus/docs/ruby/simplecov.md @@ -39,8 +39,6 @@ end This is needed to avoid conflicts between code coverage reports generated by parallel CI nodes. -If the local drive is common between parallel nodes on your CI, `simplecov` will generate a single report at `coverage/index.html` with merged data. Otherwise, you can refer to [How to merge CodeClimate reports for parallel jobs (CI nodes)](https://docs.knapsackpro.com/2019/how-to-merge-codeclimate-reports-for-parallel-jobs-ci-nodes) or [How to merge SimpleCov results with parallel Rails specs on Semaphore CI](https://docs.knapsackpro.com/2020/how-to-merge-simplecov-results-with-parallel-rails-specs). - Please [see this if you use CodeClimate](code-climate.md#rspec). ## Minitest @@ -86,3 +84,20 @@ Please [see this if you use CodeClimate](code-climate.md#minitest). +## How to merge SimpleCov reports from parallel CI nodes + +### Isolated parallel nodes with their own disk + +Please check SimpleCov docs for [merging test runs under different execution environments](https://github.com/simplecov-ruby/simplecov?tab=readme-ov-file#merging-test-runs-under-different-execution-environments). + +You could create [a rake task to merge SimpleCov reports](https://github.com/simplecov-ruby/simplecov/issues/986#issuecomment-1164999210). + +Please refer to your CI provider documentation to learn how to get files from parallel nodes and put them in the same location so that you can merge them. +You can also look at these examples: + +* [How to merge SimpleCov results with parallel Rails specs on Semaphore CI](https://docs.knapsackpro.com/2020/how-to-merge-simplecov-results-with-parallel-rails-specs) +* [How to merge CodeClimate reports for parallel jobs (CI nodes)](https://docs.knapsackpro.com/2019/how-to-merge-codeclimate-reports-for-parallel-jobs-ci-nodes) + +### Shared disk between parallel nodes + +SimpleCov generates a single report at `coverage/index.html` with merged data if a local drive is shared between parallel nodes. This is the case when you use Jenkins and the disk is shared between parallel nodes.