actions / actions/upload-code-coverage

Support glob/multiple Cobertura files (or action-side merge) in the file input

Open
#12 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
99
Forks
20
PR merge metrics
No merged PRs in 30d

Description

Summary

The file input accepts a single Cobertura XML report. Projects with a test matrix or monorepo layout produce many per-project Cobertura files, so they must be merged into one file before this action can consume them. It would help if the action accepted multiple files / a glob / a directory and merged them itself.

Current behavior
  • file is a single, required path to one Cobertura XML report.
  • There is no glob, multi-file, or directory input.
Desired behavior

Accept any one of:

  • glob patterns in file (e.g. **/*.cobertura.xml), or
  • a files input taking a newline- or comma-separated list, or
  • a directory + pattern,

and merge the matched reports (action-side or server-side) before upload. For comparison, codecov/codecov-action accepts multiple files / directory search, so matrix and monorepo setups upload without a separate merge step.

Use case

We're migrating a public .NET OSS monorepo (ChilliCream/graphql-platform) from Codecov to GitHub Code Quality. CI runs a 125-project test matrix, and each job emits its own *.cobertura.xml artifact. Codecov merged them server-side. With this action we now add an explicit merge step first:

- run: dotnet tool install --global dotnet-coverage
- run: >
    dotnet-coverage merge
    --output merged.cobertura.xml
    --output-format cobertura
    "**/*.cobertura.xml"
- uses: actions/upload-code-coverage@v1
  with:
    file: merged.cobertura.xml
    language: "C#"
    label: code-coverage/dotnet

This works, but native multi-file/glob support (or an action-side merge) would remove the extra tooling and step for the common matrix/monorepo case.

Question

If multiple uploads with distinct labels are made (e.g. one per matrix job), are they aggregated into a single PR coverage total, or treated independently? If aggregation already works that way, documenting it would cover much of this need on its own.

Drafted by Claude (Anthropic AI assistant).

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files or tests. Start by locating the implementation of the required file input and the upload path, then determine how glob, list, or directory inputs and Cobertura merging should fit; done means matrix and monorepo reports can be uploaded without a separate merge step, or the aggregation behavior is documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions, python
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.