|
43 | 43 | uses: actions/setup-dotnet@v4 |
44 | 44 | with: |
45 | 45 | dotnet-version: | |
46 | | - 6.0.x |
47 | | - 7.0.x |
48 | | - global-json-file: global.json |
| 46 | + 8.x |
| 47 | + 9.x |
49 | 48 | - name: Cache/Restore NuGets |
50 | 49 | uses: actions/cache@v4 |
51 | 50 | with: |
|
73 | 72 |
|
74 | 73 | $testResultsDir = $(Join-Path -Path (Get-Location) -ChildPath "tests/${{ matrix.os }}/test-results") |
75 | 74 | $testCoverageDir = $(Join-Path -Path (Get-Location) -ChildPath "tests/${{ matrix.os }}/coverage-results/") |
76 | | - $testCoverageFile = $(Join-Path -Path $testCoverageDir -ChildPath "coverage.net8.0.opencover.xml") |
| 75 | + $testCoverageFile = $(Join-Path -Path $testCoverageDir -ChildPath "coverage.net9.0.opencover.xml") |
77 | 76 | Write-Output "test-results-dir=$testResultsDir" >> $env:GITHUB_OUTPUT |
78 | 77 | Write-Output "test-coverage-dir=$testCoverageDir" >> $env:GITHUB_OUTPUT |
79 | 78 | Write-Output "test-coverage-file=$testCoverageFile" >> $env:GITHUB_OUTPUT |
|
85 | 84 | Write-Output "::endgroup::" |
86 | 85 |
|
87 | 86 | $downloadArtifactMessage = "You can inspect the test results by downloading the workflow artifact named: ${{ env.TEST_RESULTS_ARTIFACT_NAME }}." |
88 | | - $frameworkMonikers = @('net6.0','net7.0','net8.0') |
| 87 | + $frameworkMonikers = @('net8.0','net9.0') |
89 | 88 | foreach($frameworkMoniker in $frameworkMonikers) |
90 | 89 | { |
91 | 90 | Write-Output "::group::Running dotnet test for target framework $frameworkMoniker." |
@@ -167,27 +166,27 @@ jobs: |
167 | 166 | # |
168 | 167 | # By running this step, I make sure the test result filenames are deterministic so that on job reruns I will only get the latest test results on the the artifact with name env.TEST_RESULTS_ARTIFACT_NAME. |
169 | 168 | # Example: |
170 | | - # As of writing this I have 2 test projects and after running tests I will have one markdown file and one trx file per test project and framework. Let's consider the files for .net7.0: |
| 169 | + # As of writing this I have 2 test projects and after running tests I will have one markdown file and one trx file per test project and framework. Let's consider the files for .net9.0: |
171 | 170 | # - one md and trx file for DotNet.Sdk.Extensions.Tests.csproj and another md and trx file for DotNet.Sdk.Extensions.Testing.Tests.csproj. Which for this example let's assume would be named: |
172 | | - # - framework_net7.0_20230226152259.md |
173 | | - # - framework_net7.0_20230226152312.md |
174 | | - # - framework_net7.0_20230226152259.trx |
175 | | - # - framework_net7.0_20230226152312.trx |
| 171 | + # - framework_net9.0_20230226152259.md |
| 172 | + # - framework_net9.0_20230226152312.md |
| 173 | + # - framework_net9.0_20230226152259.trx |
| 174 | + # - framework_net9.0_20230226152312.trx |
176 | 175 | # |
177 | 176 | # The filenames contain only the framework and a timestamp. Unfortunately the assembly name is not part of the filename so it's not possible to know which test project the file belongs without viewing its content. |
178 | 177 | # After renaming we would have the following filenames: |
179 | | - # - framework_net7.0_0.md |
180 | | - # - framework_net7.0_1.md |
181 | | - # - framework_net7.0_0.trx |
182 | | - # - framework_net7.0_1.trx |
| 178 | + # - framework_net9.0_0.md |
| 179 | + # - framework_net9.0_1.md |
| 180 | + # - framework_net9.0_0.trx |
| 181 | + # - framework_net9.0_1.trx |
183 | 182 | # |
184 | 183 | # This way when re-running the job the test result filenames are deterministic and will always override existing files in the artifact with name env.TEST_RESULTS_ARTIFACT_NAME. |
185 | 184 | # This does mean that the artifact with name env.TEST_RESULTS_ARTIFACT_NAME will always only contain the test results from the latest run. |
186 | 185 | # |
187 | 186 |
|
188 | 187 | $testResultsDir = '${{ steps.dotnet-test.outputs.test-results-dir }}' |
189 | 188 | # rename test result files for all frameworks |
190 | | - $frameworkFilters = @('framework_net6.0*','framework_net7.0*','framework_net8.0*') |
| 189 | + $frameworkFilters = @('framework_net8.0*','framework_net9.0*') |
191 | 190 | foreach($frameworkFilter in $frameworkFilters) |
192 | 191 | { |
193 | 192 | # for each framework group the files by extension. There will be .md and .trx file groups |
|
0 commit comments