fix(ci): fix Codecov coverage and test results uploads#303
Merged
Conversation
Deploying archgate-cli with
|
| Latest commit: |
d5c43f0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://6dbe6ef6.archgate-cli.pages.dev |
| Branch Preview URL: | https://fix-codecov-upload.archgate-cli.pages.dev |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment Thanks for integrating Codecov - We've got you covered ☂️ |
Fix multiple issues preventing Codecov from receiving uploads: - Fix report_type input name: codecov-action v6 expects report_type (underscore), not report-type (hyphen). The hyphenated form was silently ignored, causing test results to upload via upload-coverage instead of upload-test-results. - Add disable_search: true to both upload steps to prevent auto-discovery of unrelated files (doc MDX fixtures were being picked up as coverage data). - Add push trigger for main branch to code-pull-request.yml so coverage uploads on every push to main, giving Codecov the base commit data it needs to compute diff coverage on PRs. - Switch to OIDC authentication (use_oidc) which uses GitHub's OpenID Connect provider to authenticate directly with Codecov, bypassing known token-related bugs (codecov/codecov-action#1794, #1839, #1623). OIDC is disabled for fork PRs where id-token is unavailable — those fall back to the repository token. - Add explicit slug (archgate/cli) to prevent auto-detection failures. - Add id-token: write permission to the Validate workflow for OIDC. Note: coverage data uploads currently hit a Codecov server-side 500 error (filed as codecov/codecov-action#1945). Test results uploads work. Coverage will start flowing once Codecov resolves the issue. Signed-off-by: Rhuan Barreto <rhuan@barreto.work>
42c2aec to
239055f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
report_typeinput name — codecov-action v6 expectsreport_type(underscore), notreport-type(hyphen). The hyphenated form was silently ignored, causing test results (JUnit XML) to upload viaupload-coverageinstead ofupload-test-results.disable_search: trueto both upload steps — prevents auto-discovery of unrelated files (doc MDX fixtures were being picked up as coverage data).push: branches: [main]trigger tocode-pull-request.yml— pushes to main now upload coverage, giving Codecov the base commit data it needs to compute diff coverage on PRs.Applied to both
code-pull-request.ymlandrelease.yml.Test plan
Upload queued for processing completewithout theRepository not founderror)upload-test-resultscommand (notupload-coverage)