Skip to content

Update build to support CFS for PowerShell modules #2174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,19 @@ jobs:
sparse-checkout: tools/install-powershell.ps1
sparse-checkout-cone-mode: false

- name: Install daily
if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }}
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Daily

- name: Build and test
shell: pwsh
run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}

- name: Test with daily
- name: Test daily
if: ${{ github.event_name == 'schedule' }}
shell: pwsh
run: ./pwsh/tools/install-powershell.ps1 -Daily && Invoke-Build -Configuration Release TestE2EDaily
run: Invoke-Build -Configuration Release TestE2EDaily

- name: Upload build artifacts
if: always()
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ bin/
obj/
module/PowerShellEditorServices/NOTICE.txt
module/PowerShellEditorServices/Commands/en-US/
module/Plaster/
module/PSReadLine/
module/PSScriptAnalyzer/
TestResults/
22 changes: 10 additions & 12 deletions .pipelines/PowerShellEditorServices-Official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ parameters:
variables:
system.debug: ${{ parameters.debug }}
BuildConfiguration: Release
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2019/vse2022:latest
WindowsContainerImage: onebranch.azurecr.io/windows/ltsc2022/vse2022:latest
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false

Expand All @@ -46,6 +46,10 @@ extends:
asyncSdl:
enabled: true
forStages: [build]
featureFlags:
WindowsHostVersion:
Version: 2022
Network: Netlock
stages:
- stage: build
jobs:
Expand Down Expand Up @@ -75,22 +79,16 @@ extends:
inputs:
packageType: sdk
version: 8.x
- task: UseDotNet@2
displayName: Use .NET 7.x runtime (for tests)
inputs:
packageType: runtime
version: 7.x
- task: UseDotNet@2
displayName: Use .NET 6.x runtime (for tests)
inputs:
packageType: runtime
version: 6.x
- task: PowerShell@2
displayName: Install PSResources
inputs:
pwsh: true
filePath: tools/installPSResources.ps1
- pwsh: Invoke-Build TestFull -Configuration $(BuildConfiguration)
- pwsh: |
Register-PSRepository -Name CFS -SourceLocation "https://pkgs.dev.azure.com/powershell/PowerShell/_packaging/powershell/nuget/v2" -InstallationPolicy Trusted
Install-Module -Repository CFS -Name InvokeBuild -RequiredVersion 5.11.3
Install-Module -Repository CFS -Name platyPS -RequiredVersion 0.14.2
Invoke-Build TestFull -Configuration $(BuildConfiguration) -PSRepository CFS
displayName: Build and test
- task: PublishTestResults@2
displayName: Publish test results
Expand Down
Loading