Skip to content
Merged
15 changes: 7 additions & 8 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
ref: master
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand Down Expand Up @@ -56,16 +55,17 @@ jobs:
-targetdir:./vomark-redux.Tests/$REPORT_DEST/reports \
-reporttypes:textsummary

- name: Set user config
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"

- name: Get line coverage
id: coverage
run: |
COVERAGE=$(grep "Line coverage" ./vomark-redux.Tests/${REPORT_DEST}/reports/Summary.txt | sed -E 's/.*: ([0-9.]+)%.*/\1/')
echo "coverage=$COVERAGE" >> $GITHUB_OUTPUT

- name: Set user config
run: |
git config user.name "github-actions"
git config user.email "actions@github.com"

- name: Update coverage badge
run: |
Expand All @@ -76,12 +76,11 @@ jobs:
- name: Commit badge update
run: |
git add -A

if git diff --cached --quiet; then
echo "No changes to code coverage"
else
git commit -m "AUTOMATED - Updated coverage badge [skip ci]"
git push
git push origin HEAD:${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}
fi


Expand Down
4 changes: 2 additions & 2 deletions vomark-redux.Tests/coverage/reports/Summary.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary
Generated on: 05/07/2026 - 19:54:05
Coverage date: 05/07/2026 - 19:54:03
Generated on: 05/07/2026 - 20:28:24
Coverage date: 05/07/2026 - 20:28:21
Parser: Cobertura
Assemblies: 1
Classes: 24
Expand Down