@@ -84,6 +84,20 @@ permissions:
84
84
85
85
jobs :
86
86
build :
87
+ permissions :
88
+ actions : read
89
+ checks : write
90
+ contents : read
91
+ deployments : read
92
+ id-token : none
93
+ issues : write
94
+ discussions : none
95
+ packages : none
96
+ pages : none
97
+ pull-requests : write
98
+ repository-projects : none
99
+ security-events : none
100
+ statuses : write
87
101
runs-on : ubuntu-latest
88
102
steps :
89
103
- name : Checkout
@@ -95,6 +109,10 @@ jobs:
95
109
96
110
with :
97
111
dotnet-version : ' 8.0.x'
112
+ - name : 🔨 Use .NET Core 9.0 SDK
113
+
114
+ with :
115
+ dotnet-version : ' 9.0.x'
98
116
- name : 🚒 dotnet workload restore
99
117
continue-on-error : true
100
118
run : |
@@ -113,7 +131,7 @@ jobs:
113
131
- name : 🚦 Test
114
132
id : test
115
133
run : |
116
- dotnet .build/bin/Debug/.build.dll --target DotnetCoreTest Test TriggerCodeCoverageReports GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport
134
+ dotnet .build/bin/Debug/.build.dll --target DotnetCoreTest Test CollectCodeCoverage GenerateCodeCoverageReportCobertura GenerateCodeCoverageBadges GenerateCodeCoverageSummary GenerateCodeCoverageReport
117
135
- name : 📦 Pack
118
136
id : pack
119
137
run : |
@@ -122,18 +140,6 @@ jobs:
122
140
id : default
123
141
run : |
124
142
dotnet .build/bin/Debug/.build.dll --target Default --skip Restore Build Test Pack
125
- - name : 🏺 Publish coverage data
126
- if : always()
127
-
128
- with :
129
- name : ' coverage'
130
- path : ' coverage/'
131
- - name : 📫 Publish Coverage
132
- if : (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || ((github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.user.login != 'renovate[bot]' && github.event.pull_request.user.login != 'dependabot[bot]')
133
-
134
- with :
135
- name : ' actions-${{ matrix.os }}'
136
- token : ' ${{ secrets.CODECOV_TOKEN }}'
137
143
- name : 🏺 Publish logs
138
144
if : always()
139
145
@@ -146,6 +152,30 @@ jobs:
146
152
with :
147
153
name : ' test data'
148
154
path : ' artifacts/test/'
155
+ - name : 📫 Publish Test Results
156
+ if : always()
157
+ uses : EnricoMi/publish-unit-test-result-action@v2
158
+ with :
159
+ files : ' artifacts/test/**/*.trx'
160
+ - name : 🏺 Publish coverage data
161
+ if : always()
162
+
163
+ with :
164
+ name : ' coverage'
165
+ path : ' coverage/'
166
+ - name : 📫 Publish Coverage Comment
167
+ if : github.event_name == 'pull_request'
168
+ uses : marocchino/sticky-pull-request-comment@v2
169
+ with :
170
+ header : ' Coverage'
171
+ path : ' coverage/summary/SummaryGithub.md'
172
+ GITHUB_TOKEN : ' ${{ secrets.GITHUB_TOKEN }}'
173
+ - name : 📫 Publish Codecov Coverage
174
+ if : (github.event_name != 'pull_request' && github.event_name != 'pull_request_target') || ((github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.user.login != 'renovate[bot]' && github.event.pull_request.user.login != 'dependabot[bot]')
175
+
176
+ with :
177
+ name : ' actions'
178
+ token : ' ${{ secrets.CODECOV_TOKEN }}'
149
179
- name : 🏺 Publish NuGet Packages
150
180
if : always()
151
181
0 commit comments