Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the test coverage workflow to generate the coverage report via a bash step, then share it as a single output used by the GitHub Script action. It also adds a separate log-only step for forked PRs.
- Replace the old JS-based parsing with a
Format coverage reportbash step that computes metrics and exposes them viaGITHUB_OUTPUT. - Update the
actions/github-scriptstep to consume the generated output instead of reading the file directly. - Introduce a fork-safe step that prints the report to logs instead of commenting.
Comments suppressed due to low confidence (3)
.github/workflows/test-coverage.yml:87
- Ensure
env:is indented at the same level aswith:anduses:in the step, not nested underwith, so the environment variable is recognized correctly by GitHub Actions.
env:
.github/workflows/test-coverage.yml:60
- [nitpick] Remove leading spaces before the table rows in the echoed report so that GitHub Markdown renders the coverage table correctly rather than as a code block.
| Metric | Coverage |
.github/workflows/test-coverage.yml:80
- [nitpick] The fallback string is a double-quoted literal and won’t preserve multi-line formatting if ever used; consider using a JS template literal (backticks) or rely solely on
process.env.coverage_report.
const comment = process.env.coverage_report || "${{ steps.coverage_report.outputs.coverage_report }}";
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.
No description provided.