Closed JacobStenson1 closed 1 year ago
You only have the outputs.coverage
or outputs.color
when you use a single report.
When you use a multiple-files - it can't give you an output for a single file.
You can path the filePath that you want as output here: coverage-summary-path
.
Thank you. I've used that to fix my implementation.
I've changed my jest-coverage-comment to now do this (just incase anyone else comes across this)
- name: parcel-helper Jest Coverage
id: coverageComment
if: success() || failure()
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: ./packages/parcel-helper/test/coverage/coverage-summary.json
hide-comment: true
- name: parcel-helper-common Jest Coverage
id: commonCoverageComment
if: success() || failure()
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: ./packages/parcel-helper-common/test/coverage/coverage-summary.json
hide-comment: true
- name: Create/update coverage comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
UV Migration Test Coverage
:package: parcel-helper Summary HTML:
${{ steps.coverageComment.outputs.summaryHtml }}
:link: parcel-helper-common Summary HTML:
${{ steps.commonCoverageComment.outputs.summaryHtml }}
I am not getting any values when I try and access output variables. I can see the values being displayed in action logs but cant access them when using
outputs.coverage
for some reason, see below.I'm trying to get the output variables so that I can pass them to another action to create a comment on my PR for me as this action cannot add a comment when the action trigger is from a PR review.
Thanks in advance.