Skip to content

Commit 221a935

Browse files
committed
ci tests
1 parent 525663b commit 221a935

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

src/appveyor.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,18 @@ build_script:
77
- pwsh: |
88
Invoke-WebRequest "https://dot.net/v1/dotnet-install.ps1" -OutFile "./dotnet-install.ps1"
99
./dotnet-install.ps1 -JSonFile global.json -Architecture x64 -InstallDir 'C:\Program Files\dotnet'
10-
- dotnet build src --configuration Release
11-
- dotnet test src --configuration Release --no-build --no-restore
10+
- pwsh: |
11+
dotnet build src --configuration Release
12+
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
13+
dotnet test src --configuration Release --no-build --no-restore --logger trx
14+
$testExit = $LASTEXITCODE
15+
$url = "https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)"
16+
Get-ChildItem -Recurse -Filter *.trx | ForEach-Object {
17+
Write-Host "Uploading test results: $($_.FullName)"
18+
try { (New-Object System.Net.WebClient).UploadFile($url, $_.FullName) }
19+
catch { Write-Host "Failed to upload test results: $_" }
20+
}
21+
if ($testExit -ne 0) { exit $testExit }
1222
test: off
1323
on_failure:
1424
- ps: |

0 commit comments

Comments
 (0)