File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -180,6 +180,8 @@ jobs:
180
180
echo "Creating coverage report..."
181
181
# Create xml file for further processing; Create even if below minimum
182
182
coverage xml --fail-under=0
183
+ # Write markdown report to job summary
184
+ coverage report --fail-under=0 --format=markdown -m >> "$GITHUB_STEP_SUMMARY"
183
185
184
186
# For future use in case we want to add a PR comment for 3rd party PRs which requires
185
187
# a workflow with elevated PR write permissions. Move below steps into a separate job.
@@ -210,6 +212,12 @@ jobs:
210
212
# Note: it appears fail below min is one off, use fail_under -1 here
211
213
thresholds : ' 95 98'
212
214
215
+ - name : Add link to report badge
216
+ if : ${{ always() && steps.cov_xml_upload.outputs.artifact-id != '' }}
217
+ run : |
218
+ run_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.pull_request.number }}"
219
+ sed -i "1s|^\(!.*\)$|[\1]($run_url)|" code-coverage-results.md
220
+
213
221
- name : Add Coverage PR Comment
214
222
uses : marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.3
215
223
# Create PR comment when the branch is on the repo, otherwise we lack PR write permissions
You can’t perform that action at this time.
0 commit comments