Skip to content

Commit 3fa2503

Browse files
committed
ci: add coverage reporting
1 parent 55f3200 commit 3fa2503

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ jobs:
2929
name: Test
3030
needs: [setup]
3131
runs-on: ubuntu-latest
32+
permissions:
33+
pull-requests: write
3234
steps:
3335
- name: Checkout repository
3436
uses: actions/checkout@v5
@@ -41,7 +43,22 @@ jobs:
4143
cache-hash: ${{ env.CACHE_KEY_BASE }}-${{ hashFiles('deno.lock') }}
4244

4345
- name: Test
44-
run: deno test --allow-read --no-prompt
46+
run: deno test -P --no-prompt --coverage
47+
48+
- name: Report code coverage
49+
uses: zgosalvez/github-actions-report-lcov@v4
50+
with:
51+
coverage-files: coverage/lcov.*.info
52+
minimum-coverage: 50
53+
artifact-name: coverage-report
54+
github-token: ${{ secrets.GITHUB_TOKEN }}
55+
update-comment: true
56+
57+
- name: Upload coverage reports
58+
uses: actions/upload-artifact@v4
59+
with:
60+
name: raw-coverage-reports
61+
path: coverage
4562

4663
lint:
4764
name: Lint

0 commit comments

Comments
 (0)