diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 29deb471b..9f221c5aa 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -78,15 +78,6 @@ jobs: - name: Run Tests run: dotnet cake --target=Tests --test-filter=${{ startsWith(matrix.os, 'ubuntu') && 'FullyQualifiedName~Testcontainers' || 'DockerPlatform=Windows' }} - # The Test Reporter GH Action is not compatible with the recent - # actions/upload-artifact@v4 updates: https://github.com/dorny/test-reporter/issues/363. - - name: Upload Test And Coverage Results - uses: actions/upload-artifact@v3 - if: always() - with: - name: ${{ matrix.os }}-v3 - path: test-results - - name: Upload Test And Coverage Results uses: actions/upload-artifact@v4 if: always() diff --git a/.github/workflows/test-report.yml b/.github/workflows/test-report.yml index aace9c34c..3b246fb7d 100644 --- a/.github/workflows/test-report.yml +++ b/.github/workflows/test-report.yml @@ -21,10 +21,11 @@ jobs: contents: read steps: + # https://github.com/dorny/test-reporter/issues/363#issuecomment-2381625959. - name: Publish Test Report - uses: dorny/test-reporter@v1.8.0 + uses: dorny/test-reporter@v1.9.1 with: - artifact: ${{ matrix.os }}-v3 + artifact: ${{ matrix.os }} name: report (${{ matrix.os }}) path: '*.trx' reporter: dotnet-trx diff --git a/build.cake b/build.cake index 159e045df..7b6fb4884 100644 --- a/build.cake +++ b/build.cake @@ -1,4 +1,4 @@ -#tool nuget:?package=dotnet-sonarscanner&version=7.1.1 +#tool nuget:?package=dotnet-sonarscanner&version=9.0.0 #addin nuget:?package=Cake.Sonar&version=1.1.32 @@ -74,18 +74,21 @@ Task("Build") Task("Tests") .Does(() => { - DotNetTest(param.Solution, new DotNetTestSettings + foreach(var testProject in param.Projects.OnlyTests) { - Configuration = param.Configuration, - Verbosity = param.Verbosity, - NoRestore = true, - NoBuild = true, - Collectors = new[] { "XPlat Code Coverage;Format=opencover" }, - Filter = param.TestFilter, - ResultsDirectory = param.Paths.Directories.TestResultsDirectoryPath, - ArgumentCustomization = args => args - .AppendSwitchQuoted("--blame-hang-timeout", "5m") - }); + DotNetTest(testProject.Path.FullPath, new DotNetTestSettings + { + Configuration = param.Configuration, + Verbosity = param.Verbosity, + NoRestore = true, + NoBuild = true, + Collectors = new[] { "XPlat Code Coverage;Format=opencover" }, + Filter = param.TestFilter, + ResultsDirectory = param.Paths.Directories.TestResultsDirectoryPath, + ArgumentCustomization = args => args + .AppendSwitchQuoted("--blame-hang-timeout", "5m") + }); + } }); Task("Sonar-Begin")