scripts/tests/ has held three PowerShell suites that no workflow ever invoked -- there is no Windows runner in CI, so they have been inert since they landed. A regression test nothing executes is worse than none: it reads as coverage. Adds a windows-latest job, gated on a new `installer` lane so it only fires for PRs touching install.ps1 or its tests. The 8.3 suite runs under both pwsh 7 and Windows PowerShell 5.1, since install.ps1 arrives via `irm | iex` into whichever shell the user already has and 5.1 is what ships with Windows. Only the 8.3 suite is wired up. The other two fail on main today for unrelated reasons; they can join once they are fixed.
39 lines
1.4 KiB
YAML
39 lines
1.4 KiB
YAML
name: Installer tests
|
|
|
|
# scripts/install.ps1's PowerShell tests. They exercise the installer as a real
|
|
# subprocess, and every path contract they assert (8.3 short-name aliases,
|
|
# Git Bash layouts, provider-cmdlet behavior) is Windows-specific — so they need
|
|
# a Windows runner. Before this workflow existed the files were in the tree but
|
|
# nothing ever ran them.
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: installer-tests-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
powershell:
|
|
name: PowerShell installer tests
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
|
|
# Windows PowerShell 5.1 as well as pwsh 7: install.ps1 is delivered via
|
|
# `irm | iex` into whatever shell the user already has, and 5.1 is what
|
|
# ships with Windows. A construct that only parses under 7 is a broken
|
|
# installer for most of the people hitting it.
|
|
- name: 8.3 short-path normalization (pwsh 7)
|
|
shell: pwsh
|
|
run: pwsh -NoProfile -ExecutionPolicy Bypass -File scripts/tests/test-install-ps1-longpath.ps1
|
|
|
|
- name: 8.3 short-path normalization (Windows PowerShell 5.1)
|
|
shell: powershell
|
|
run: powershell -NoProfile -ExecutionPolicy Bypass -File scripts/tests/test-install-ps1-longpath.ps1
|