From 3750b763f4d26d23b825c437ba1986a1279470f5 Mon Sep 17 00:00:00 2001 From: Andy Jordan <2226434+andyleejordan@users.noreply.github.com> Date: Tue, 4 Mar 2025 17:04:28 -0800 Subject: [PATCH] Test PowerShell Preview in CI instead of Daily --- .github/workflows/ci-test.yml | 21 ++++----------------- PowerShellEditorServices.build.ps1 | 15 ++++++++------- 2 files changed, 12 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 959d482ec..b2bc889e6 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -5,11 +5,6 @@ on: branches: [ main ] pull_request: branches: [ main ] - merge_group: - types: [ checks_requested ] - schedule: - # 6am UTC which should be after a new daily build posts - - cron: "0 6 * * *" jobs: ci: @@ -36,8 +31,7 @@ jobs: shell: pwsh run: ./tools/installPSResources.ps1 - - name: Download daily install script - if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }} + - name: Download PowerShell install script uses: actions/checkout@v4 with: repository: PowerShell/PowerShell @@ -45,20 +39,13 @@ 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' }} - continue-on-error: true + - name: Install preview shell: pwsh - run: ./pwsh/tools/install-powershell.ps1 -Daily + run: ./pwsh/tools/install-powershell.ps1 -Preview - name: Build and test shell: pwsh - run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }} - - - name: Test daily - if: ${{ github.event_name == 'schedule' }} - shell: pwsh - run: Invoke-Build -Configuration Release TestE2EDaily + run: Invoke-Build -Configuration Release TestFull - name: Upload build artifacts if: always() diff --git a/PowerShellEditorServices.build.ps1 b/PowerShellEditorServices.build.ps1 index cf2666517..c781e1e55 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -227,16 +227,17 @@ Task TestE2EPwsh Build, SetupHelpForTests, { Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 } } -$PwshDaily = if ($script:IsNix) { - "$HOME/.powershell-daily/pwsh" +$PwshPreview = if ($script:IsNix) { + "$HOME/.powershell-preview/pwsh" } else { - "$env:LOCALAPPDATA/Microsoft/powershell-daily/pwsh.exe" + "$env:LOCALAPPDATA/Microsoft/powershell-preview/pwsh.exe" } -Task TestE2EDaily -If (Test-Path $PwshDaily) Build, SetupHelpForTests, { +Task TestE2EPreview Build, SetupHelpForTests, { + Assert (Test-Path $PwshPreview) "PowerShell Preview not found at $PwshPreview, please install it: https://github.com/PowerShell/PowerShell/blob/master/tools/install-powershell.ps1" Set-Location ./test/PowerShellEditorServices.Test.E2E/ - $env:PWSH_EXE_NAME = $PwshDaily - Write-Build DarkGreen "Running end-to-end tests with: $(& $PwshDaily --version)" + $env:PWSH_EXE_NAME = $PwshPreview + Write-Build DarkGreen "Running end-to-end tests with: $(& $PwshPreview --version)" Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 } } @@ -314,6 +315,6 @@ Task BuildIfChanged -Inputs { Task Test TestPS74, TestE2EPwsh, TestPS51, TestE2EPowerShell -Task TestFull Test, TestE2EDaily, TestE2EPwshCLM, TestE2EPowerShellCLM +Task TestFull Test, TestE2EPreview, TestE2EPwshCLM, TestE2EPowerShellCLM Task . Clean, Build, Test