Skip to content

Commit 25b2070

Browse files
committed
Add code coverage comments to PRs
1 parent 7932b43 commit 25b2070

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/CI.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,22 @@ jobs:
159159
- name: Run tests
160160
run: pnpm test:coverage
161161

162+
- name: Download previous coverage artifact
163+
uses: actions/download-artifact@v4
164+
continue-on-error: true
165+
with:
166+
name: test-coverage
167+
path: previous-coverage
168+
github-token: ${{ secrets.GITHUB_TOKEN }}
169+
repository: ${{ github.repository }}
170+
171+
- name: Coverage Report as Comment (Clover)
172+
uses: lucassabreu/comment-coverage-clover@main
173+
with:
174+
file: ./coverage/clover.xml
175+
base-file: ./previous-coverage/clover.xml
176+
github-token: ${{ secrets.GITHUB_TOKEN }}
177+
162178
- name: Upload test coverage
163179
if: success()
164180
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)