Skip to content

Fix Codecov v5 coverage upload: explicit files path and fail_ci_if_error#308

Open
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-readthedocs-config-update-codecov-v5
Open

Fix Codecov v5 coverage upload: explicit files path and fail_ci_if_error#308
Copilot wants to merge 2 commits intodevelopfrom
copilot/fix-readthedocs-config-update-codecov-v5

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 14, 2026

After upgrading to codecov/codecov-action@v5, coverage uploads silently failed — Codecov reported "Missing Head Commit" and showed no coverage data because v5 doesn't reliably auto-discover coverage.xml.

Changes

  • .github/workflows/ci.yml
    • Add files: ./coverage.xml to explicitly target the report generated by pytest --cov-report=xml
    • Add fail_ci_if_error: true so future upload failures surface as CI failures rather than silent passes
- name: Upload coverage to Codecov
  uses: codecov/codecov-action@v5
  with:
    token: ${{ secrets.CODECOV_TOKEN }}
    files: ./coverage.xml
    fail_ci_if_error: true
Original prompt

Fix ReadTheDocs config and update Codecov action to v5
Merged
6 minutes ago Copilot authored #307
No Status

HEAD

Patch

Change

Source
Coverage data is unknown
Why is there no coverage data? the data is not yet available and still processing.

Files changed0
Indirect changes0
Commits0
Flags0
Components0
File explorer
Missing Head Commit
Unable to compare commits because the head commit was not found.
Learn more here

uncovered
partial
!
covered
No Files covered by tests were changed

What does all this mean? Codecov still failing?


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

@jamiebull1
Copy link
Copy Markdown
Owner

What are you checking here?

Co-authored-by: jamiebull1 <3817160+jamiebull1@users.noreply.github.com>
Copilot AI changed the title [WIP] Update ReadTheDocs config and Codecov action to version 5 Fix Codecov v5 coverage upload: explicit files path and fail_ci_if_error Mar 14, 2026
Copilot AI requested a review from jamiebull1 March 14, 2026 17:03
@jamiebull1 jamiebull1 marked this pull request as ready for review March 14, 2026 17:04
@jamiebull1
Copy link
Copy Markdown
Owner

This is still failing

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the CI workflow to make Codecov uploads reliable after moving to codecov/codecov-action@v5, by explicitly pointing the action at the generated coverage report and surfacing upload failures.

Changes:

  • Configure Codecov upload to use an explicit report path (./coverage.xml).
  • Make Codecov upload failures fail the CI job (fail_ci_if_error: true).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment thread .github/workflows/ci.yml
Comment on lines 41 to +46
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants