-
Notifications
You must be signed in to change notification settings - Fork 114
35 lines (30 loc) · 1.04 KB
/
upload-coverage-report.yml
File metadata and controls
35 lines (30 loc) · 1.04 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 run 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 the runner
uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # v2.19.3
with:
egress-policy: audit
- name: 'Download coverage results'
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: coverage-results
- name: Add Code Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md