[BUG] Can't get coverage report
Describe the bug Coverage files are being uploaded to codecov, but the report is "empty"
To Reproduce Steps to reproduce the behavior:
- See the following PR, which is the third attempt of getting a coverage report for this code changes and fork: https://github.com/maplibre/maplibre-gl-js/pull/5903
Expected behavior I should get a coverage report and a comment in the PR with the coverage updates
Regression State whether this is a regression and when the last successful instance occurred
Screenshots See above
Product Area Coverage
Versions
- OS: linux, ubuntu-v24,
- Git Host: GitHub,
- CI/CD: GitHub Actions
- Uploader: Current latest version 5 of github actions
Commit and CI link See above
Additional context This is going on for a few days now, the PR owner only want to get his PR merged and I can't approve it without the code coverage report
This issue is essentially identical to the one I submitted in #1831. I created #1831 because the description here lacks some clarity and detail. I believe this is a bug rather than a support request, and therefore the "support" label may not be appropriate. @thomasrockhu-codecov
Upon reviewing the PR link provided by the author of this issue, it’s clear that Codecov successfully created the relevant checks, but did not generate a coverage report comment. In the Codecov UI, the commit and its coverage data are correctly shown, yet the PR itself displays a ‘missing head commit’ message — indicating that Codecov is unable to associate the commit with the pull request.
I'm not sure if this is the same issue or not, but in the following PR I'm missing coverage comment, which I'm using a lot to understand if a specific code that was introduced is covered in tests. Not having it really make my job harder... https://github.com/maplibre/maplibre-gl-js/pull/5989
I'm not sure if this is the same issue or not, but in the following PR I'm missing coverage comment, which I'm using a lot to understand if a specific code that was introduced is covered in tests. Not having it really make my job harder... maplibre/maplibre-gl-js#5989
I can tell you with confidence that we have the same issue — Codecov is able to create comments on PRs from different branches within the same repository, but it cannot create comments on PRs from forked repositories. Also, if you open the 'Pulls' tab in the Codecov UI, you'll see that PRs from forked repositories show 'Missing Head Commit'.
I believe that https://github.com/Flexget/Flexget is also experiencing the same issue.
Any updates on this, I'm flying blind here... Here's another PR without coverage:
- https://github.com/maplibre/maplibre-gl-js/pull/6163
Same here, the main branch definitely had multiple verified coverage uploads from GH, but still no message in PR, and the same error about Missing Head Commit is shown on Codecov website (same as for OP).
Same here, the
mainbranch definitely had multiple verified coverage uploads from GH, but still no message in PR, and the same error aboutMissing Head Commitis shown on Codecov website (same as for OP).
Your issue is different from the one the PR author and I have. The two of us just can't see comments on PRs from forked repositories, but the check status always shows up, and comments on PRs from different branches of the same repository are visible.
@HarelM https://github.com/codecov/feedback/issues/789#issuecomment-3448221444 is the final answer to this issue, and I think this issue can be closed.
Is the problem fixed? I haven't seen codecov comments on my project's PRs in the recent days.
@HarelM Did you check the link I sent above?
Yup, read it from start to end, but the resolution of the issues was not clear to me, and the issue is still open... So I'm a bit confused...
@HarelM There’s a link to a PR in that comment. You’ll need to apply a similar fix in your own repository.
@HarelM, the short end of it is to migrate from using codecov/test-results-action to codecov/codecov-action. I'll be deprecating the test-results-action this week.
You can do that by replacing test-results-action@v? to codecov-action@v5 and adding report_type: test_results. See this PR as an example
I'll simply remove it, there's no real added value for me in using it... Thanks for circling back to this issue.