Skip to content

Commit b7d8521

Browse files
Update testDotnetPostgres.yml
1 parent c365069 commit b7d8521

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

.github/workflows/testDotnetPostgres.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8+
workflow_dispatch:
89

910
jobs:
1011
build-and-test:
@@ -79,5 +80,25 @@ jobs:
7980
--configuration $CONFIGURATION \
8081
--connection "$ConnectionStrings__LocalDatabase"
8182
82-
- name: Run tests
83-
run: dotnet test -c $CONFIGURATION
83+
- name: Test
84+
run: dotnet test -c $CONFIGURATION --collect:"XPlat Code Coverage" --results-directory ./coverage
85+
86+
- name: Code Coverage Report
87+
uses: irongut/[email protected]
88+
with:
89+
filename: coverage/**/coverage.cobertura.xml
90+
badge: true
91+
fail_below_min: false
92+
format: markdown
93+
hide_branch_rate: false
94+
hide_complexity: true
95+
indicators: true
96+
output: both
97+
thresholds: '60 80'
98+
99+
- name: Add Coverage PR Comment
100+
uses: marocchino/sticky-pull-request-comment@v2
101+
if: github.event_name == 'pull_request'
102+
with:
103+
recreate: true
104+
path: code-coverage-results.md

0 commit comments

Comments
 (0)