File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -48,12 +48,10 @@ jobs:
4848 run : dotnet tool restore
4949
5050 - name : Build
51- # Uses 'dotnet pwsh' because the default shell (bash/cmd) is not PowerShell
5251 run : dotnet pwsh ./build.ps1 -Build -Configuration ${{ env.CONFIGURATION }}
5352
5453 - name : Pack (Windows only)
5554 if : runner.os == 'Windows'
56- # Uses 'shell: pwsh' so commands run in PowerShell context
5755 shell : pwsh
5856 run : |
5957 $commitTimestamp = git log -1 --format=%cI
9593 ForEach-Object { dotnet sourcelink test $_; if ($LASTEXITCODE) { throw "SourceLink test failed for $_" } }
9694
9795 - name : Test
98- # Uses 'dotnet pwsh' because the default shell (bash/cmd) is not PowerShell
9996 run : dotnet pwsh ./build.ps1 -Test -NoBuild -Configuration ${{ env.CONFIGURATION }}
10097
10198 - name : Integration Tests (Windows)
Original file line number Diff line number Diff line change @@ -84,20 +84,13 @@ Push-Location $PSScriptRoot
8484try {
8585 function Invoke-DotNet {
8686 param (
87- [string []] $Arguments ,
88- [switch ] $AllowTestFailures
87+ [string []] $Arguments
8988 )
9089
9190 Write-Host " dotnet $ ( $Arguments -join ' ' ) " - ForegroundColor Cyan
9291 & dotnet @Arguments
9392 if ($LASTEXITCODE -ne 0 ) {
94- # Some test frameworks (e.g., net47) may not run on all platforms (Linux/macOS require mono).
95- # Allow exit code 1 for test commands when the runnable tests passed but some frameworks couldn't execute.
96- if ($AllowTestFailures -and $LASTEXITCODE -eq 1 ) {
97- Write-Host " Test command returned exit code 1 (this may be due to net47 requiring mono on Linux)" - ForegroundColor Yellow
98- } else {
99- throw " dotnet command failed with exit code $LASTEXITCODE "
100- }
93+ throw " dotnet command failed with exit code $LASTEXITCODE "
10194 }
10295 }
10396
@@ -115,9 +108,7 @@ try {
115108 }
116109
117110 Write-Host " `n === Running Tests ===" - ForegroundColor Green
118- # AllowTestFailures handles the case where net47 tests cannot run (requires mono on Linux/macOS)
119- # while still ensuring that tests that can run actually pass
120- Invoke-DotNet ' test' , ' --no-build' , ' --configuration' , $Configuration - AllowTestFailures
111+ Invoke-DotNet ' test' , ' --no-build' , ' --configuration' , $Configuration
121112
122113 # Note: Roslyn 4.4 analyzer is validated through integration tests
123114 # that use the packed NuGet package containing both analyzer variants
You can’t perform that action at this time.
0 commit comments