Skip to content

Commit fcd5f2d

Browse files
committed
Modified logic to not build full on non-Windows
Add additional verbose statements for debugging
1 parent e9c8175 commit fcd5f2d

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

appveyor.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,14 @@ install:
3232
3333
build_script:
3434
- 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
3942
}
40-
./build.ps1 -Configuration "$env:BuildConfiguration" -PSVersion "$env:PSVersion" -Framework full
4143
- pwsh: |
4244
if ($env:PowerShellEdition -eq 'PowerShellCore') {
4345
Set-Location $env:APPVEYOR_BUILD_FOLDER

tools/appveyor.psm1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ function Invoke-AppveyorTest {
5050
$CheckoutPath
5151
)
5252

53+
Write-Verbose -Verbose ("Running tests on PowerShell version " + $PSVersionTable.PSVersion)
54+
5355
$modulePath = $env:PSModulePath.Split([System.IO.Path]::PathSeparator) | Where-Object { Test-Path $_} | Select-Object -First 1
5456
Copy-Item "${CheckoutPath}\out\PSScriptAnalyzer" "$modulePath\" -Recurse -Force
5557
$testResultsFile = ".\TestResults.xml"
5658
$testScripts = "${CheckoutPath}\Tests\Engine","${CheckoutPath}\Tests\Rules","${CheckoutPath}\Tests\Documentation"
5759
$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"
5862
(New-Object 'System.Net.WebClient').UploadFile("https://ci.appveyor.com/api/testresults/nunit/${env:APPVEYOR_JOB_ID}", (Resolve-Path $testResultsFile))
5963
if ($testResults.FailedCount -gt 0) {
6064
throw "$($testResults.FailedCount) tests failed."

0 commit comments

Comments
 (0)