Skip to content

Commit 3750b76

Browse files
committed
Test PowerShell Preview in CI instead of Daily
1 parent 9d56407 commit 3750b76

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

.github/workflows/ci-test.yml

+4-17
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ on:
55
branches: [ main ]
66
pull_request:
77
branches: [ main ]
8-
merge_group:
9-
types: [ checks_requested ]
10-
schedule:
11-
# 6am UTC which should be after a new daily build posts
12-
- cron: "0 6 * * *"
138

149
jobs:
1510
ci:
@@ -36,29 +31,21 @@ jobs:
3631
shell: pwsh
3732
run: ./tools/installPSResources.ps1
3833

39-
- name: Download daily install script
40-
if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }}
34+
- name: Download PowerShell install script
4135
uses: actions/checkout@v4
4236
with:
4337
repository: PowerShell/PowerShell
4438
path: pwsh
4539
sparse-checkout: tools/install-powershell.ps1
4640
sparse-checkout-cone-mode: false
4741

48-
- name: Install daily
49-
if: ${{ github.event_name == 'schedule' || github.event_name == 'merge_group' }}
50-
continue-on-error: true
42+
- name: Install preview
5143
shell: pwsh
52-
run: ./pwsh/tools/install-powershell.ps1 -Daily
44+
run: ./pwsh/tools/install-powershell.ps1 -Preview
5345

5446
- name: Build and test
5547
shell: pwsh
56-
run: Invoke-Build -Configuration Release ${{ github.event_name == 'merge_group' && 'TestFull' || 'Test' }}
57-
58-
- name: Test daily
59-
if: ${{ github.event_name == 'schedule' }}
60-
shell: pwsh
61-
run: Invoke-Build -Configuration Release TestE2EDaily
48+
run: Invoke-Build -Configuration Release TestFull
6249

6350
- name: Upload build artifacts
6451
if: always()

PowerShellEditorServices.build.ps1

+8-7
Original file line numberDiff line numberDiff line change
@@ -227,16 +227,17 @@ Task TestE2EPwsh Build, SetupHelpForTests, {
227227
Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 }
228228
}
229229

230-
$PwshDaily = if ($script:IsNix) {
231-
"$HOME/.powershell-daily/pwsh"
230+
$PwshPreview = if ($script:IsNix) {
231+
"$HOME/.powershell-preview/pwsh"
232232
} else {
233-
"$env:LOCALAPPDATA/Microsoft/powershell-daily/pwsh.exe"
233+
"$env:LOCALAPPDATA/Microsoft/powershell-preview/pwsh.exe"
234234
}
235235

236-
Task TestE2EDaily -If (Test-Path $PwshDaily) Build, SetupHelpForTests, {
236+
Task TestE2EPreview Build, SetupHelpForTests, {
237+
Assert (Test-Path $PwshPreview) "PowerShell Preview not found at $PwshPreview, please install it: https://github.com/PowerShell/PowerShell/blob/master/tools/install-powershell.ps1"
237238
Set-Location ./test/PowerShellEditorServices.Test.E2E/
238-
$env:PWSH_EXE_NAME = $PwshDaily
239-
Write-Build DarkGreen "Running end-to-end tests with: $(& $PwshDaily --version)"
239+
$env:PWSH_EXE_NAME = $PwshPreview
240+
Write-Build DarkGreen "Running end-to-end tests with: $(& $PwshPreview --version)"
240241
Invoke-BuildExec { & dotnet $script:dotnetTestArgs $script:NetFramework.PS74 }
241242
}
242243

@@ -314,6 +315,6 @@ Task BuildIfChanged -Inputs {
314315

315316
Task Test TestPS74, TestE2EPwsh, TestPS51, TestE2EPowerShell
316317

317-
Task TestFull Test, TestE2EDaily, TestE2EPwshCLM, TestE2EPowerShellCLM
318+
Task TestFull Test, TestE2EPreview, TestE2EPwshCLM, TestE2EPowerShellCLM
318319

319320
Task . Clean, Build, Test

0 commit comments

Comments
 (0)