-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (30 loc) · 897 Bytes
/
Copy pathpr-comment.yaml
File metadata and controls
33 lines (30 loc) · 897 Bytes
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
name: Report test coverage on PR
on:
pull_request:
branches: [ "main" ]
jobs:
comment-test-coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Test
id: test
run: |
echo "coverage<<EOF" >> $GITHUB_OUTPUT
make test-gha >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- uses: actions/github-script@v7
env:
INPUT_COVERAGE: ${{ steps.test.outputs.coverage }}
with:
github-token: ${{ secrets.GHA_PRS }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '```' + core.getInput('coverage') + '```'
})