diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 6a2f09928..5d1e6031b 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,13 +39,11 @@ 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 -Destination ./preview - - name: If Debugging, start upterm for interactive pipeline troubleshooting + - name: If debugging, start upterm for interactive pipeline troubleshooting if: ${{ runner.debug == 1 }} uses: lhotari/action-upterm@v1 with: @@ -59,12 +51,7 @@ jobs: - 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 116ae70eb..ffb24dfb4 100644 --- a/PowerShellEditorServices.build.ps1 +++ b/PowerShellEditorServices.build.ps1 @@ -263,11 +263,11 @@ Task SetupHelpForTests { } } - if ($PwshDaily -and (Get-Command $PwshDaily -ea 0)) { - Write-Build DarkMagenta "Checking PowerShell Daily help at $PwshDaily" - Invoke-BuildExec { & $PwshDaily -NoProfile -NonInteractive -Command $installHelpScript -args $helpPath } + if ($PwshPreview -and (Get-Command $PwshPreview -ea 0)) { + Write-Build DarkMagenta "Checking PowerShell Preview help at $PwshPreview" + Invoke-BuildExec { & $PwshPreview -NoProfile -NonInteractive -Command $installHelpScript -args $helpPath } if ($LASTEXITCODE -ne 0) { - throw 'Failed to install PowerShell Daily help!' + throw 'Failed to install PowerShell Preview help!' } } @@ -307,16 +307,17 @@ Task TestE2EPwsh Build, SetupHelpForTests, { Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 } } -$PwshDaily = if ($script:IsNix) { - "$HOME/.powershell-daily/pwsh" +if ($env:GITHUB_ACTIONS) { + $PwshPreview = if ($script:IsNix) { "$PSScriptRoot/preview/pwsh" } else { "$PSScriptRoot/preview/pwsh.exe" } } else { - "$env:LOCALAPPDATA/Microsoft/powershell-daily/pwsh.exe" + $PwshPreview = if ($script:IsNix) { "$HOME/.powershell-preview/pwsh" } else { "$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 } } @@ -394,6 +395,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