@@ -25,47 +25,39 @@ jobs:
2525
2626 steps :
2727 - uses : actions/checkout@v4
28-
2928 - name : Setup .NET 8 SDK
3029 uses : actions/setup-dotnet@v4
3130 with :
3231 dotnet-version : ' 8.0.x'
33-
3432 - name : Cache NuGet
3533 uses : actions/cache@v4
3634 with :
3735 path : ~/.nuget/packages
3836 key : nuget-${{ runner.os }}-${{ hashFiles('**/*.[cC][sS]proj', '**/*.props', '**/*.targets') }}
3937 restore-keys : nuget-${{ runner.os }}-
40-
4138 - name : Restore
4239 run : dotnet restore
43-
4440 - name : dotnet format (verify)
4541 run : dotnet format --verify-no-changes --verbosity minimal
46-
4742 - name : Build (warnings -> errors)
4843 run : dotnet build --configuration Release -p:TreatWarningsAsErrors=true --no-restore
49-
5044 test :
5145 name : Test ${{ matrix.dotnet }} on ${{ matrix.os }}
5246 needs : lint
5347 runs-on : ${{ matrix.os }}
54-
5548 strategy :
5649 fail-fast : false
5750 matrix :
5851 os : [ ubuntu-latest ]
59- dotnet : [ '8.0.x', '9.0.x' ]
60-
52+ dotnet :
53+ - ' 8.0.x'
54+ - ' 9.0.x'
6155 steps :
6256 - uses : actions/checkout@v4
63-
6457 - name : Setup .NET SDK
6558 uses : actions/setup-dotnet@v4
6659 with :
6760 dotnet-version : ${{ matrix.dotnet }}
68-
6961 - name : Cache NuGet
7062 uses : actions/cache@v4
7163 with :
@@ -74,20 +66,12 @@ jobs:
7466 restore-keys : |
7567 nuget-${{ runner.os }}-${{ matrix.dotnet }}-
7668 nuget-${{ runner.os }}-
77-
7869 - name : Restore
7970 run : dotnet restore
80-
8171 - name : Build
8272 run : dotnet build --configuration Release --no-restore
83-
8473 - name : Test + Coverage
85- run : |
86- dotnet test --configuration Release --no-build \
87- --verbosity normal \
88- --logger "trx;LogFileName=test-results.trx" \
89- --collect "XPlat Code Coverage"
90-
74+ run : dotnet test --configuration Release --no-build --verbosity normal --logger "trx;LogFileName=test-results.trx" --collect "XPlat Code Coverage"
9175 - name : Upload TRX
9276 uses : actions/upload-artifact@v4
9377 if : always()
9680 path : ' **/*.trx'
9781 overwrite : true
9882 retention-days : 7
99-
10083 - name : Upload raw coverage
10184 uses : actions/upload-artifact@v4
10285 with :
@@ -105,43 +88,26 @@ jobs:
10588 if-no-files-found : error
10689 overwrite : true
10790 retention-days : 7
108-
10991 coverage :
11092 name : Coverage (merged)
11193 runs-on : ubuntu-latest
11294 needs : test
113-
11495 steps :
11596 - uses : actions/checkout@v4
116-
11797 - name : Setup .NET 8 SDK
11898 uses : actions/setup-dotnet@v4
11999 with :
120100 dotnet-version : ' 8.0.x'
121-
122101 - name : Restore
123102 run : dotnet restore
124-
125103 - name : Build
126104 run : dotnet build --configuration Release --no-restore
127-
128105 - name : Test w/ coverage (8.0—single run)
129- run : |
130- dotnet test --configuration Release --no-build \
131- --collect "XPlat Code Coverage" \
132- --results-directory coverage \
133- --settings coverlet.runsettings
134-
106+ run : dotnet test --configuration Release --no-build --collect "XPlat Code Coverage" --results-directory coverage --settings coverlet.runsettings
135107 - name : Install ReportGenerator
136108 run : dotnet tool install -g dotnet-reportgenerator-globaltool
137-
138109 - name : Generate consolidated report
139- run : |
140- reportgenerator \
141- -reports:"**/coverage.cobertura.xml" \
142- -targetdir:"coverage/report" \
143- -reporttypes:"Html;Cobertura;JsonSummary"
144-
110+ run : reportgenerator -reports:"**/coverage.cobertura.xml" -targetdir:"coverage/report" -reporttypes:"Html;Cobertura;JsonSummary"
145111 - name : Upload to Codecov
146112 uses : codecov/codecov-action@v5
147113 env :
@@ -151,7 +117,6 @@ jobs:
151117 flags : unittests
152118 name : codecov-umbrella
153119 fail_ci_if_error : false
154-
155120 - name : Upload coverage report artifact
156121 uses : actions/upload-artifact@v4
157122 with :
0 commit comments