Skip to content

Commit 2427610

Browse files
bergmeisterJamesWTruher
authored andcommitted
Add Ubuntu Build+Test to Appveyor CI (#940)
* test using pwsh * fix yaml syntax * install platyps on pwsh * appveyor still uses pwsh 6.0.0 * fix 1 test for pwsh. 1 remaining * make test pending that is failing on pwsh on Windows as well. * re-fix test for pwsh * really fix test and simplify * tweak and optimize appveyor.yml * extract appveyor steps into ps module to eliminate code duplication * fix and simplify test script * fix path problem and put appveyor finish into module as well * pwsh sessions are not being persisted on appveyor. Fix module deployment as well * remove wmf4 image temporarily to run it on the fork again * revert test script to non-module version because some tests failed * try fix yaml syntax * use consistent space and try $ErrorActionPreference = 'Stop' in appveyor module * fix appveyorfinish for pwsh and give test-appveyor function a last try * take out invoke-appveyortest method since it does not work in the appveyor environment * add wmf4 image as it is ready for PW now. * install platyps in a wmf4 friendly way * let's try if we can remove the hard coded checkout path (fingers crossed this works in WMF as well) * let's try if we can rename the PowerShellEdition to something more meaningful (again fingers crossed for the WMF 4 build) * Set DOTNET_SKIP_FIRST_TIME_EXPERIENCE to 1 to speed-up WMF4 builds, which have to install the .net sdk from scratch * make indentation consistent after rename * remove setting PATH for psmodulepath in yaml (not needed for VS 2017 image, let's hope it works for WMF 4 as well) * try ubuntu image * fix ps edition * fix test for linux * add debugging code * fix case sensitivity problems * re-add other images for PR * git mv rules\UseSupportsShouldProcess.cs Rules\UseSupportsShouldProcess.cs
1 parent 00c4787 commit 2427610

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
File renamed without changes.

appveyor.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ environment:
99
- APPVEYOR_BUILD_WORKER_IMAGE: WMF 4
1010
PowerShellEdition: WindowsPowerShell
1111
BuildConfiguration: PSv3Release
12+
- APPVEYOR_BUILD_WORKER_IMAGE: Ubuntu
13+
PowerShellEdition: PowerShellCore
14+
BuildConfiguration: Release
1215

1316
# cache Nuget packages and dotnet CLI cache
1417
cache:
1518
- '%USERPROFILE%\.nuget\packages -> appveyor.yml'
1619
- '%LocalAppData%\Microsoft\dotnet -> appveyor.yml'
1720

1821
install:
19-
- ps: Import-Module .\tools\appveyor.psm1
20-
- ps: if ($env:PowerShellEdition -eq 'WindowsPowerShell') { Invoke-AppveyorInstall }
22+
- ps: if ($env:PowerShellEdition -eq 'WindowsPowerShell') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }
2123
- pwsh: if ($env:PowerShellEdition -eq 'PowerShellCore') { Import-Module .\tools\appveyor.psm1; Invoke-AppveyorInstall }
2224

2325
build_script:
@@ -47,7 +49,7 @@ test_script:
4749
}
4850
- pwsh: |
4951
if ($env:PowerShellEdition -eq 'PowerShellCore') {
50-
$modulePath = $env:PSModulePath.Split(';') | Where-Object { Test-Path $_} | Select-Object -First 1
52+
$modulePath = $env:PSModulePath.Split([System.IO.Path]::PathSeparator) | Where-Object { Test-Path $_} | Select-Object -First 1
5153
Copy-Item "${env:APPVEYOR_BUILD_FOLDER}\out\PSScriptAnalyzer" "$modulePath\" -Recurse -Force
5254
$testResultsFile = ".\TestResults.xml"
5355
$testScripts = "${env:APPVEYOR_BUILD_FOLDER}\Tests\Engine","${env:APPVEYOR_BUILD_FOLDER}\Tests\Rules"
@@ -60,4 +62,4 @@ test_script:
6062
6163
# Upload the project along with test results as a zip archive
6264
on_finish:
63-
- ps: Invoke-AppveyorFinish
65+
- ps: Import-Module .\tools\appveyor.psm1; Invoke-AppveyorFinish

0 commit comments

Comments
 (0)