From bd97043783e3c2f5d3f4f43b6858b5e43eb9b60b Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Tue, 29 Sep 2026 08:45:41 -0300 Subject: [PATCH 1/2] feat(csharp-ci): upload the merged cobertura report as -coverage-report --- .github/workflows/csharp-ci.yaml | 11 ++++++++++- CHANGELOG.md | 4 ++++ README.md | 8 ++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/csharp-ci.yaml b/.github/workflows/csharp-ci.yaml index a1cf97c..71de49b 100644 --- a/.github/workflows/csharp-ci.yaml +++ b/.github/workflows/csharp-ci.yaml @@ -203,7 +203,7 @@ on: artifact-prefix: description: >- Prefix applied to per-run artifact names (coverage-percent, - ci-result-) to namespace them by language. Set a distinct + coverage-report, ci-result-) to namespace them by language. Set a distinct value per language when multiple CI workflows (e.g. csharp-ci and scala-ci) run as sibling jobs in the same caller run, so their run-level artifacts don't collide. @@ -358,6 +358,15 @@ jobs: -f cobertura \ "${cobertura_files[@]}" + - name: Upload merged cobertura report + if: ${{ matrix.coverage }} + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: ${{ inputs.artifact-prefix }}-coverage-report + path: coverage/merged.cobertura.xml + if-no-files-found: error + retention-days: 1 + - name: Extract coverage percentage if: ${{ matrix.coverage }} working-directory: ${{ github.workspace }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f07cf47..ba44c89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Added + +- `csharp-ci.yaml`'s coverage shard uploads the merged Cobertura report (`coverage/merged.cobertura.xml`, the file `dotnet-coverage merge` produces from every per-project report) as the run artifact `-coverage-report` (default `csharp-coverage-report`), with `retention-days: 1`. A caller job that `needs` the `csharp-ci` job can download it with `actions/download-artifact` to run checks over the whole-solution coverage, such as asserting that every source module appears in it, without re-running the tests. The name shares the `artifact-prefix` namespace with `-coverage-percent` and `-ci-result-*` and matches neither, and it differs from `scala-ci.yaml`'s `coverage-artifact-name` (default `scala-coverage`, which already uploads its Cobertura file), so sibling csharp and scala jobs in one caller run do not collide. Purely additive: no input or output changes. + ## [2.5.0] - 2026-09-29 ### Added diff --git a/README.md b/README.md index 9415dbb..bd2307e 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,14 @@ Produces a Cobertura coverage report, a markdown summary, and a sticky PR comment with per-project coverage. Uploads `.nupkg` artifacts when `pack: true`. +The coverage shard also uploads the merged Cobertura report +(`coverage/merged.cobertura.xml`) as the run artifact +`-coverage-report` (default `csharp-coverage-report`, kept +for one day), so a downstream caller job can download it and check +whole-solution coverage without re-running the tests. Other run artifacts +under the same prefix: `-coverage-percent` and +`-ci-result-`. + A configurable matrix runs build + test across one or several runners. The simple `os-list` form takes a JSON array of runner labels (Linux / macOS / Windows) and runs coverage on the `ubuntu-latest` shard. For finer control — From 07829802282280c730ce4b6f85d9e3bdd61b0094 Mon Sep 17 00:00:00 2001 From: monsieurleberre Date: Tue, 29 Sep 2026 15:02:05 -0300 Subject: [PATCH 2/2] fix(csharp-ci): let a re-run overwrite the merged coverage report artifact Claude-Session: https://claude.ai/code/session_014G5qnxAD2S5aNSTfQmaGF7 --- .github/workflows/csharp-ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/csharp-ci.yaml b/.github/workflows/csharp-ci.yaml index 71de49b..5ae1034 100644 --- a/.github/workflows/csharp-ci.yaml +++ b/.github/workflows/csharp-ci.yaml @@ -366,6 +366,7 @@ jobs: path: coverage/merged.cobertura.xml if-no-files-found: error retention-days: 1 + overwrite: true - name: Extract coverage percentage if: ${{ matrix.coverage }}