Skip to content

Commit 5ef0481

Browse files
authored
Post coverage comment on CI runs (#238)
1 parent 26a3fd2 commit 5ef0481

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,24 @@ jobs:
5959
test:
6060
name: Run jest tests
6161
runs-on: ubuntu-latest
62+
permissions:
63+
contents: read
64+
pull-requests: write
6265
steps:
6366
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
6467

6568
- name: Setup
6669
uses: ./.github/actions/setup
6770

68-
- run: yarn test
71+
- run: yarn test --coverage --testPathPatterns="modules/@shopify/checkout-sheet-kit/tests" --coverageReporters=json-summary
72+
73+
- name: Coverage comment
74+
if: github.event_name == 'pull_request'
75+
uses: MishaKav/jest-coverage-comment@main
76+
with:
77+
coverage-summary-path: ./coverage/coverage-summary.json
78+
title: 'Coverage Report'
79+
create-new-comment: false
6980

7081
test-android:
7182
name: Run Android Tests

0 commit comments

Comments
 (0)