diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 32ce1a34..a7910c11 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -70,7 +70,7 @@ jobs: $outputRoot = Join-Path $PWD 'artifacts\hidi\powershell-coverage' New-Item -ItemType Directory -Force -Path $outputRoot | Out-Null $configuration = New-PesterConfiguration - $configuration.Run.Path = 'test\scripts\check-nuget-package-published.Tests.ps1' + $configuration.Run.Path = 'test\Microsoft.OpenApi.Hidi.Tests\check-nuget-package-published.Tests.ps1' $configuration.Run.PassThru = $true $configuration.CodeCoverage.Enabled = $true $configuration.CodeCoverage.Path = $helper diff --git a/src/Microsoft.OpenApi.Hidi/readme.md b/src/Microsoft.OpenApi.Hidi/readme.md index 249af7bb..0d9b83a9 100644 --- a/src/Microsoft.OpenApi.Hidi/readme.md +++ b/src/Microsoft.OpenApi.Hidi/readme.md @@ -89,8 +89,10 @@ access, the ESRP connection and protected `nuget-org` environment authorization before cutover; local packaging does not prove production signing or publishing. The private-feed helper has isolated Pester 5.7.1 tests (no live feed access). -Run `Invoke-Pester .\test\scripts\check-nuget-package-published.Tests.ps1` to -execute the cases. The Sonar workflow also measures helper line coverage and +Run `Invoke-Pester .\test\Microsoft.OpenApi.Hidi.Tests\check-nuget-package-published.Tests.ps1` to +execute the cases. The test resides physically inside the Hidi test project so +SonarScanner for .NET classifies it as test code, rather than root source code. +The Sonar workflow also measures helper line coverage and imports a generic coverage report alongside the existing C# OpenCover reports. ### Windows executable diff --git a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj index 8995d0c6..098f5f0b 100644 --- a/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj +++ b/test/Microsoft.OpenApi.Hidi.Tests/Microsoft.OpenApi.Hidi.Tests.csproj @@ -29,7 +29,6 @@ - PreserveNewest diff --git a/test/scripts/check-nuget-package-published.Tests.ps1 b/test/Microsoft.OpenApi.Hidi.Tests/check-nuget-package-published.Tests.ps1 similarity index 100% rename from test/scripts/check-nuget-package-published.Tests.ps1 rename to test/Microsoft.OpenApi.Hidi.Tests/check-nuget-package-published.Tests.ps1