codecov / codecov/codecov-action

[BUG] codecov-action generates coverage.xml when it already exists and disable_search is enabled

Open
#1,933 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
1.7k
Forks
260
Avg merge
1d 7h
Merged PRs (30d)
1

Description

Describe the bug
When specifying the file that should be uploaded (coverage.xml) with the files option and even using disable_search as the docs suggest, the logs still show "Generating coverage.xml" and the action overwrites the existing coverage.xml, fails (because it's using the wrong RC file) and the job fails.

This seems particularly odd behaviour to me given that the example workflows suggest you should generate the xml file in the previous step. So why is codecov-action generating it a second time?

To Reproduce
https://github.com/aio-libs/aiohttp/actions/runs/24285058345/job/70912960518

Expected behavior
Don't overwrite my coverage.xml file.

Product Area
action

Versions

  • CI/CD: GitHub Actions
  • Uploader: codecov-action@v6

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.

Research direction

Start by reproducing the aiohttp workflow linked in the issue with codecov-action@v6, using the files option and disable_search with an existing coverage.xml. Trace the upload and coverage-generation behavior, then verify that an existing coverage.xml is not overwritten and the job succeeds with the intended RC file.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.