@@ -22,24 +22,24 @@ jobs:
2222 - name : Publish Test Summary Results
2323 if : ${{ always() }}
2424 run : |
25- if [ -f test-reports/vitest.junit.xml ]; then
26- npm run report:junit2ctrf
27- npm run report:ctrfsummary
28- sed -i 's/<h3>Test Summary<\/h3>/<h3>Unit Test Summary<\/h3>/' $GITHUB_STEP_SUMMARY
29- npm run report:prcomment
30-
31- # The junit-to-ctrf npm package exits with a 0 status code even if
32- # it fails to parse the JUnit report, so check for the CTRF file manually
33- # and explicilty exit with a non-zero status code if it's not found.
34- if [ ! -e test-reports/ctrf-report.json ]; then
35- echo "CTRF report not created - junit-to-ctrf may have failed to parse JUnit report"
36- exit 1
37- fi
38- else
39- echo "No JUnit report found - compilation or linting may have failed before tests could run"
25+ if [ ! -f test-reports/vitest.junit.xml ]; then
26+ echo "No JUnit report found"
4027 mkdir -p pr-comment
4128 exit 1
4229 fi
30+
31+ npm run report:junit2ctrf
32+ npm run report:ctrfsummary
33+ sed -i 's/<h3>Test Summary<\/h3>/<h3>Unit Test Summary<\/h3>/' $GITHUB_STEP_SUMMARY
34+ npm run report:prcomment
35+
36+ # The junit-to-ctrf npm package exits with a 0 status code even if
37+ # it fails to parse the JUnit report, so check for the CTRF file manually
38+ # and explicilty exit with a non-zero status code if it's not found.
39+ if [ ! -f test-reports/ctrf-report.json ]; then
40+ echo "CTRF report not created - junit-to-ctrf may have failed to parse JUnit report"
41+ exit 1
42+ fi
4343 - name : Save PR Number
4444 if : ${{ always() }}
4545 run : echo ${{ github.event.number }} > pr-comment/PR-number.txt
0 commit comments