Skip to content
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ jobs:
echo "Creating coverage report..."
# Create xml file for further processing; Create even if below minimum
coverage xml --fail-under=0
# Write markdown report to job summary
coverage report --fail-under=0 --format=markdown -m >> "$GITHUB_STEP_SUMMARY"

# For future use in case we want to add a PR comment for 3rd party PRs which requires
# a workflow with elevated PR write permissions. Move below steps into a separate job.
Expand Down Expand Up @@ -210,6 +212,11 @@ jobs:
# Note: it appears fail below min is one off, use fail_under -1 here
thresholds: '95 98'

- name: Add link to report badge
run: |
run_url="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}?pr=${{ github.event.pull_request.number }}"
sed -i "1s|^\(!.*\)$|[\1]($run_url)|" code-coverage-results.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is clever!

...maybe a bit too clever 😆 the sed command feels complex enough to me that I worry it's maybe not worth the maintenance burden. But it's definitely cool! And I guess we can just get rid of it if it unexpectedly breaks for whatever reason in the future


- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.3
# Create PR comment when the branch is on the repo, otherwise we lack PR write permissions
Expand Down
Loading