Skip to content

Commit 44763ba

Browse files
author
Dias, Diego
committed
Simplify coverage reporting to avoid action errors
- Remove ArtiomTr/jest-coverage-report-action (was failing) - Add simple coverage summary to GitHub Actions summary - Upload coverage artifacts with if: always() to ensure they're saved even on failure
1 parent b2e3abd commit 44763ba

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

.github/workflows/test-coverage.yml

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,23 @@ jobs:
3131
- name: Run Jest Tests with Coverage
3232
run: npm run test:coverage
3333

34-
- name: Generate Coverage Report Comment
35-
uses: ArtiomTr/jest-coverage-report-action@v2
36-
with:
37-
github-token: ${{ secrets.GITHUB_TOKEN }}
38-
test-script: npm run test:coverage
39-
coverage-file: ./coverage/jest-tests/coverage-summary.json
40-
annotations: failed-tests
41-
package-manager: npm
42-
4334
- name: Upload Coverage Reports
4435
uses: actions/upload-artifact@v4
36+
if: always()
4537
with:
4638
name: coverage-report
4739
path: coverage/jest-tests/
40+
41+
- name: Coverage Summary
42+
if: always()
43+
run: |
44+
echo "## 📊 Coverage Summary" >> $GITHUB_STEP_SUMMARY
45+
echo "" >> $GITHUB_STEP_SUMMARY
46+
echo "Coverage report has been generated and uploaded as an artifact." >> $GITHUB_STEP_SUMMARY
47+
echo "" >> $GITHUB_STEP_SUMMARY
48+
echo "### Coverage Files" >> $GITHUB_STEP_SUMMARY
49+
if [ -f coverage/jest-tests/coverage-summary.json ]; then
50+
echo '```json' >> $GITHUB_STEP_SUMMARY
51+
cat coverage/jest-tests/coverage-summary.json >> $GITHUB_STEP_SUMMARY
52+
echo '```' >> $GITHUB_STEP_SUMMARY
53+
fi

0 commit comments

Comments
 (0)