ci: add Codecov test results upload to enable Test Analytics#9
Conversation
The CI workflow was using codecov/codecov-action@v4 for coverage reporting but was not uploading test results to Codecov Test Analytics. This change: - Adds codecov/test-results-action@v1 to upload junit.xml to Test Analytics - Removes junit.xml from codecov-action files parameter (coverage only) - Maintains existing dorny/test-reporter for GitHub Checks integration This enables Codecov Test Analytics features including test failure tracking, flaky test detection, and test performance metrics. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
This PR separates coverage and test results uploads to Codecov by using two distinct actions. Previously, both coverage.xml and junit.xml were uploaded together through the codecov-action. Now, coverage is uploaded via codecov/codecov-action and test results are uploaded separately via codecov/test-results-action.
- Split Codecov uploads into separate steps for coverage and test results
- Introduced
codecov/test-results-action@v1for JUnit test results - Removed
junit.xmlfrom the original codecov-action file list
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Summary
This PR fixes the Codecov test results upload issue by adding the
codecov/test-results-action@v1to the CI workflow. Previously, test results were not being uploaded to Codecov Test Analytics despite JUnit XML files being generated correctly.Changes Made
codecov/test-results-action@v1step in.github/workflows/ci.yml(after line 222) to upload test results to Codecov Test Analyticscodecov/codecov-action@v4configuration by removing./junit.xmlfrom thefilesparameter (line 218), as this action is designed for coverage reports onlydorny/test-reporter@v1integration for GitHub Checks visibilityRoot Cause
The workflow was incorrectly passing
junit.xmltocodecov/codecov-action@v4, which is designed for coverage reports (coverage.xml), not test results. While pytest was generating JUnit XML correctly, no action was uploading these test results to Codecov Test Analytics.Benefits
This change enables several Codecov Test Analytics features:
Test Results Distribution
After this change, test results will be available in three places:
codecov/test-results-action@v1dorny/test-reporter@v1codecov/codecov-action@v4Test Plan
make checklocally - all checks passedReferences
codecov/test-results-action@v1wasn't uploading🤖 Generated with Claude Code