Related to this Feature Request, we are also running a mono repo and our CI runs a subset of the tests for only affected projects in PR builds. We also use flags to separate reports from different projects.
Our problem is that when Codecov posts data back to a PR, information for all defined flags (for 20+ projects in our mono repo) are included, regardless of whether the project associated with the flag is touched in the PR or not. Is there a way we can hide information for those unaffected projects?
If not, can Codecov have some builtin support for this use case? For example:
- Codecov omits flags (projects) that has no reports uploaded with it?
- Codecov provides a way for CI to indicate what the affected projects are for a specific PR?
- Codecov skips post for flags without coverage change? (This can be inaccurate as coverage remaining the same doesn’t imply the project not getting changed. But it would do for us.)
If you need more details:
Our current repo setup is that:
- We have defined a flag in codecov.yml, for each of the projects in the repo
- For a push build, all tests will run, and reports of all projects will be generated and uploaded to Codecov with its corresponding flag
- For a PR build (branched from a commit on
masterbranch), only tests for affected projects will run, and only those reports are uploaded to Codecov
With this setup, the current behavior we observe is that:
- PR comment has all defined flags including both affected and unaffected projects
- Two build status entries (absolute coverage (project), and incremental coverage (patch)) are added to the build status list, for each of the flags
- For those unaffected projects, their coverage numbers are shown as no change