codecov / codecov/codecov-action

Unable to specify coverage reports flags per file

Open
#1,522 3 comments 7 reactions 1 assignee View on GitHub

@thomasrockhu-codecov is already working on this.

Since Aug 1, 2024.

codecov/codecov-action
Dominant language
Python
Stars
1.7k
Forks
260
Avg merge
1d 7h
Merged PRs (30d)
1

Description

Current way to define flags forces them to apply to all files part of a single upload step. Ideally the flags should be per file and not per upload action.

This makes Github Actions definition much harder to manage as we are forced to add extra calls to the upload action, especially as GHA does not have any support for looping.

It would be far more flexible if we could so something like:

    - name: Upload coverage to Codecov
      uses: codecov/codecov-action@v4
      with:
        directory: ./coverage/reports/
        files: ./coverage1.xml:unit,./coverage2.xml:e2e,!./cache # <- note the `:flag` after file pattern.
        # flags: unit,e2e

Or maybe someone else has another idea?

Contributor guide

Open the contributing guide

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.