codecov / codecov/codecov-action
codecov action not associating upload with branch when commit already exists v2
@thomasrockhu-codecov is already working on this.
Since Feb 20, 2025.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 260
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 1
Description
Hi,
From https://github.com/codecov/codecov-action/issues/1296
We are seeing a result which matches the earlier report.
Tl;Dr: I know guesses are not always helpful, but my guess as to what's happening is that if CI builds on a specific branch using the exact same commit that was previously built in a pull request, the commit doesn't get associated with the branch, perhaps because create-commit has already been run.
In our repository, the develop branch is fast-forward merged into master. That means both branches have the exact same commit.
If the develop branch is uploaded first, that will be displayed correctly.
Then, codecov shows no information about the master branch, even though its github actions ran.
Presumably because it thinks that commit has already been processed.
It's surprising nobody else is experiencing this same issue. How is that possible? Or, there is something else going on.
If you are already using this github action, to replicate the issue (hopefully) fast-forward merge one branch into another. Are the results posted on codecov, and associated with the new branch?
Example step in the job:
- name: Upload coverage
if: matrix.coverage
uses: codecov/codecov-action@v5
with:
disable_search: true
fail_ci_if_error: true
files: coverage.info
name: Github Actions
override_branch: ${{ steps.coverage_branch.outputs.override_branch }}
token: ${{secrets.CODECOV_TOKEN}}
verbose: true
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.