Skip to content

Commit 8845dff

Browse files
ci: migrate from PR comments to summaries
1 parent dda60f9 commit 8845dff

File tree

1 file changed

+19
-9
lines changed

1 file changed

+19
-9
lines changed

.github/workflows/frontend-test.yml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
test-and-coverage:
1414
runs-on: ubuntu-latest
1515
permissions:
16-
pull-requests: write # to add comments to the PRs
16+
# pull-requests: write # to add comments to the PRs
1717
contents: read
1818

1919
steps:
@@ -37,14 +37,24 @@ jobs:
3737
# 2. RUN COVERAGE ON PRs
3838
- name: Run jest with coverage
3939
if: github.event_name == 'pull_request'
40-
run: npx jest --coverage --coverageReporters json-summary
40+
run: npx jest --coverage --coverageReporters=cobertura
4141
working-directory: frontend
4242

43-
# 3. POST COMMENT ON PR
44-
- name: Jest Coverage Comment
45-
if: >
46-
github.event_name == 'pull_request'
47-
uses: MishaKav/jest-coverage-comment@main
43+
# # 3. POST COMMENT ON PR
44+
# - name: Jest Coverage Comment
45+
# if: >
46+
# github.event_name == 'pull_request'
47+
# uses: MishaKav/jest-coverage-comment@main
48+
# with:
49+
# coverage-summary-path: ./frontend/coverage/coverage-summary.json
50+
# title: Frontend Coverage Report
51+
52+
# 3. WRITE COVERAGE SUMMARY TO CHECKS
53+
- name: Write Summary from File
54+
if: github.event_name == 'pull_request'
55+
uses: irongut/[email protected]
4856
with:
49-
coverage-summary-path: ./frontend/coverage/coverage-summary.json
50-
title: Frontend Coverage Report
57+
filename: frontend/coverage/cobertura-coverage.xml
58+
badge: true
59+
format: markdown
60+
output: both

0 commit comments

Comments
 (0)