Skip to content

Commit a99180d

Browse files
committed
Update build to support CFS for PowerShell modules
And a bunch of clean-ups to the build script, updated SDKs, removal of PowerShell 7.3 (EOL), and testing PowerShell daily on merge.
1 parent 29c8d0f commit a99180d

File tree

7 files changed

+121
-219
lines changed

7 files changed

+121
-219
lines changed

.github/workflows/ci-test.yml

+7-2
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,19 @@ jobs:
4747
sparse-checkout: tools/install-powershell.ps1
4848
sparse-checkout-cone-mode: false
4949

50+
- name: Install daily
51+
if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }}
52+
shell: pwsh
53+
run: ./pwsh/tools/install-powershell.ps1 -Daily
54+
5055
- name: Build and test
5156
shell: pwsh
5257
run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}
5358

54-
- name: Test with daily
59+
- name: Test daily
5560
if: ${{ github.event_name == 'schedule' }}
5661
shell: pwsh
57-
run: ./pwsh/tools/install-powershell.ps1 -Daily && Invoke-Build -Configuration Release TestE2EDaily
62+
run: Invoke-Build -Configuration Release TestE2EDaily
5863

5964
- name: Upload build artifacts
6065
if: always()

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ bin/
22
obj/
33
module/PowerShellEditorServices/NOTICE.txt
44
module/PowerShellEditorServices/Commands/en-US/
5-
module/Plaster/
65
module/PSReadLine/
76
module/PSScriptAnalyzer/
87
TestResults/

.pipelines/PowerShellEditorServices-Official.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ parameters:
2727
variables:
2828
system.debug: ${{ parameters.debug }}
2929
BuildConfiguration: Release
30-
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
30+
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
3131
DOTNET_NOLOGO: true
3232
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
3333

@@ -46,6 +46,10 @@ extends:
4646
asyncSdl:
4747
enabled: true
4848
forStages: [build]
49+
featureFlags:
50+
WindowsHostVersion:
51+
Version: 2022
52+
Network: Netlock
4953
stages:
5054
- stage: build
5155
jobs:
@@ -75,22 +79,16 @@ extends:
7579
inputs:
7680
packageType: sdk
7781
version: 8.x
78-
- task: UseDotNet@2
79-
displayName: Use .NET 7.x runtime (for tests)
80-
inputs:
81-
packageType: runtime
82-
version: 7.x
8382
- task: UseDotNet@2
8483
displayName: Use .NET 6.x runtime (for tests)
8584
inputs:
8685
packageType: runtime
8786
version: 6.x
88-
- task: PowerShell@2
89-
displayName: Install PSResources
90-
inputs:
91-
pwsh: true
92-
filePath: tools/installPSResources.ps1
93-
- pwsh: Invoke-Build TestFull -Configuration $(BuildConfiguration)
87+
- pwsh: |
88+
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
89+
Install-Module -Repository CFS -Name InvokeBuild -RequiredVersion 5.11.3
90+
Install-Module -Repository CFS -Name platyPS -RequiredVersion 0.14.2
91+
Invoke-Build TestFull -Configuration $(BuildConfiguration) -PSRepository CFS
9492
displayName: Build and test
9593
- task: PublishTestResults@2
9694
displayName: Publish test results

0 commit comments

Comments
 (0)