Skip to content

Commit

Permalink
bug: testresult trx file missing failing build
Browse files Browse the repository at this point in the history
  • Loading branch information
alastairtree committed May 22, 2019
1 parent d0d2cc2 commit 827dfb5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,14 @@ Try {

Exec { dotnet test $_.FullName --configuration $config --no-build --no-restore --logger:"trx;LogFileName=..\..\test-result.trx" }

$testResults = (Resolve-Path .\test-result*.trx)
# if on build server upload results to AppVeyor
if ("${ENV:APPVEYOR_JOB_ID}" -ne "") {
$wc = New-Object 'System.Net.WebClient'
$wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-result.trx))
$wc.UploadFile("https://ci.appveyor.com/api/testresults/mstest/$($env:APPVEYOR_JOB_ID)", $testResults)
}

Remove-Item .\test-result.trx -ErrorAction SilentlyContinue
Remove-Item $testResults -ErrorAction SilentlyContinue
}

# Publish the nupkg artifacts
Expand Down

0 comments on commit 827dfb5

Please sign in to comment.