File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,14 @@ function Invoke-AppveyorTest {
5050
5151 $modulePath = $env: PSModulePath.Split ([System.IO.Path ]::PathSeparator) | Where-Object { Test-Path $_ } | Select-Object - First 1
5252 Copy-Item " ${CheckoutPath} \out\PSScriptAnalyzer" " $modulePath \" - Recurse - Force
53- $testResultsFile = " .\ TestResults.xml"
53+ $testResultsPath = Join-Path ${CheckoutPath} TestResults.xml
5454 $testScripts = " ${CheckoutPath} \Tests\Engine" , " ${CheckoutPath} \Tests\Rules" , " ${CheckoutPath} \Tests\Documentation"
55- $testResults = Invoke-Pester - Script $testScripts - OutputFormat NUnitXml - OutputFile $testResultsFile - PassThru
56- (New-Object ' System.Net.WebClient' ).UploadFile(" https://ci.appveyor.com/api/testresults/nunit/${env: APPVEYOR_JOB_ID} " , (Resolve-Path $testResultsFile ))
55+ $uploadUrl = " https://ci.appveyor.com/api/testresults/nunit/${env: APPVEYOR_JOB_ID} "
56+ $testResults = Invoke-Pester - Script $testScripts - OutputFormat NUnitXml - OutputFile $testResultsPath - PassThru
57+ Write-Verbose - Verbose " Uploading test results '$testResultsPath ' to '${uploadUrl} '"
58+ $response = (New-Object ' System.Net.WebClient' ).UploadFile(" $uploadUrl " , $testResultsPath )
59+ $responseString = [System.Text.Encoding ]::ASCII.GetString($response )
60+ Write-Verbose - Verbose (" Response: ({0} bytes) ${responseString} " -f $response.Count )
5761 if ($testResults.FailedCount -gt 0 ) {
5862 throw " $ ( $testResults.FailedCount ) tests failed."
5963 }
You can’t perform that action at this time.
0 commit comments