Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/csharp-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ on:
artifact-prefix:
description: >-
Prefix applied to per-run artifact names (coverage-percent,
ci-result-<shard>) to namespace them by language. Set a distinct
coverage-report, ci-result-<shard>) 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.
Expand Down Expand Up @@ -358,6 +358,16 @@ 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
Comment thread
monsieurleberre marked this conversation as resolved.
overwrite: true

- name: Extract coverage percentage
if: ${{ matrix.coverage }}
working-directory: ${{ github.workspace }}
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<artifact-prefix>-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 `<prefix>-coverage-percent` and `<prefix>-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
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
`<artifact-prefix>-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: `<artifact-prefix>-coverage-percent` and
`<artifact-prefix>-ci-result-<shard>`.

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 —
Expand Down
Loading