-
Notifications
You must be signed in to change notification settings - Fork 10
35 lines (30 loc) · 1.01 KB
/
upload-coverage-report.yml
File metadata and controls
35 lines (30 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Add code coverage summary to PRs
# Allows code coverage comments to be embedded in PRs if the build was ran on a fork.
on:
workflow_run:
workflows: ["ci-build"]
types:
- completed
jobs:
prCoverageComment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
if:
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Harden Runner
uses: step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf # v2.11.1
with:
egress-policy: audit
- name: 'Download coverage results'
uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # v4.2.1
with:
name: coverage-results
- name: Add Code Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@52423e01640425a022ef5fd42c6fb5f633a02728 # v2.9.1
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md