Skip to content

Commit c10fde3

Browse files
add text summary for coverage results to the build log
1 parent 0ebe2c0 commit c10fde3

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
- name: Determine Version
2323
uses: gittools/actions/gitversion/[email protected]
2424
id: gitversion
25-
with:
26-
useConfigFile: true
2725

2826
- name: Display GitVersion outputs
2927
run: |
@@ -50,7 +48,21 @@ jobs:
5048
with:
5149
reports: 'coverage/**/coverage.cobertura.xml'
5250
targetdir: 'coverage-report'
53-
reporttypes: 'Html;Cobertura'
51+
reporttypes: 'Html;Cobertura;TextSummary'
52+
53+
- name: Display Code Coverage Summary
54+
run: |
55+
echo "## 📊 Code Coverage Summary" >> $GITHUB_STEP_SUMMARY
56+
if [ -f "coverage-report/Summary.txt" ]; then
57+
echo '```' >> $GITHUB_STEP_SUMMARY
58+
cat coverage-report/Summary.txt >> $GITHUB_STEP_SUMMARY
59+
echo '```' >> $GITHUB_STEP_SUMMARY
60+
echo "### Build Log Coverage Summary:"
61+
cat coverage-report/Summary.txt
62+
else
63+
echo "⚠️ Coverage summary file not found"
64+
echo "⚠️ Coverage summary file not found" >> $GITHUB_STEP_SUMMARY
65+
fi
5466
5567
- name: Create NuGet package
5668
working-directory: src

0 commit comments

Comments
 (0)