File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -32,12 +32,14 @@ install:
32
32
33
33
build_script :
34
34
- ps : |
35
- Set-Location $env:APPVEYOR_BUILD_FOLDER
36
- ./build.ps1 -Documentation
37
- if ( $env:PSVersion -eq "4" ) { # On WMF4: Also build for v3 to check it builds at least since we do not have a WMF3 image
38
- ./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 3 -Framework full
35
+ if ( $env:PowerShellEdition -eq 'WindowsPowerShell' ) {
36
+ Set-Location $env:APPVEYOR_BUILD_FOLDER
37
+ ./build.ps1 -Documentation
38
+ if ( $env:PSVersion -eq "4" ) { # On WMF4: Also build for v3 to check it builds at least since we do not have a WMF3 image
39
+ ./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion 3 -Framework full
40
+ }
41
+ ./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
39
42
}
40
- ./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
41
43
- pwsh : |
42
44
if ($env:PowerShellEdition -eq 'PowerShellCore') {
43
45
Set-Location $env:APPVEYOR_BUILD_FOLDER
Original file line number Diff line number Diff line change @@ -50,11 +50,15 @@ function Invoke-AppveyorTest {
50
50
$CheckoutPath
51
51
)
52
52
53
+ Write-Verbose - Verbose (" Running tests on PowerShell version " + $PSVersionTable.PSVersion )
54
+
53
55
$modulePath = $env: PSModulePath.Split ([System.IO.Path ]::PathSeparator) | Where-Object { Test-Path $_ } | Select-Object - First 1
54
56
Copy-Item " ${CheckoutPath} \out\PSScriptAnalyzer" " $modulePath \" - Recurse - Force
55
57
$testResultsFile = " .\TestResults.xml"
56
58
$testScripts = " ${CheckoutPath} \Tests\Engine" , " ${CheckoutPath} \Tests\Rules" , " ${CheckoutPath} \Tests\Documentation"
57
59
$testResults = Invoke-Pester - Script $testScripts - OutputFormat NUnitXml - OutputFile $testResultsFile - PassThru
60
+ $assemblyLocation = (Get-Command Invoke-ScriptAnalyer ).ImplementingType.Assembly.Location
61
+ Write-Verbose - Verbose " Engine loaded from $assemblyLocation "
58
62
(New-Object ' System.Net.WebClient' ).UploadFile(" https://ci.appveyor.com/api/testresults/nunit/${env: APPVEYOR_JOB_ID} " , (Resolve-Path $testResultsFile ))
59
63
if ($testResults.FailedCount -gt 0 ) {
60
64
throw " $ ( $testResults.FailedCount ) tests failed."
You can’t perform that action at this time.
0 commit comments