Skip to content

Commit ba46518

Browse files
committed
RI-7038: add code coverage summary for FE tests
1 parent 459b72b commit ba46518

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

.github/workflows/tests-frontend.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
jobs:
1111
unit-tests:
1212
runs-on: ubuntu-latest
13-
name: Frontend tests
13+
name: Frontend tests (Coverage: ${{ env.coverage }}%)
1414
steps:
1515
- uses: actions/checkout@v4
1616

@@ -52,6 +52,13 @@ jobs:
5252
timeout-minutes: 30
5353
run: yarn test:cov --ci --silent
5454

55+
- name: Extract Coverage Percentage
56+
id: extract-coverage
57+
run: |
58+
COVERAGE=$(cat ./report/coverage/coverage-summary.json | jq '.total.lines.pct')
59+
echo "Coverage: $COVERAGE%"
60+
echo "coverage=$COVERAGE" >> $GITHUB_ENV
61+
5562
- name: Upload Test Report
5663
uses: actions/upload-artifact@v4
5764
if: always()

0 commit comments

Comments
 (0)