From 60766d2353596874f6dbba8cb8eb1a31cb47897f Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Sun, 25 Oct 2026 06:16:27 +0100 Subject: [PATCH 1/2] ci: use explicit Windows PowerShell and pwsh shells --- .github/workflows/ci.yml | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5831975..dcf7446 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,14 +6,12 @@ permissions: contents: read jobs: powershell: + name: Windows PowerShell 5.1 runs-on: windows-latest - strategy: - matrix: - shell: [powershell, pwsh] steps: - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - name: Parse PowerShell source - shell: ${{ matrix.shell }} + shell: powershell run: | $ErrorActionPreference = 'Stop' Get-ChildItem scripts,tests -Filter '*.ps1' -Recurse | ForEach-Object { @@ -22,7 +20,24 @@ jobs: if ($parseErrors.Count) { throw ($parseErrors | Out-String) } } - name: Test token boundaries and platform guards without ITK - shell: ${{ matrix.shell }} + shell: powershell + run: ./tests/Test-Offline.ps1 + pwsh: + name: PowerShell Core + runs-on: windows-latest + steps: + - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 + - name: Parse PowerShell source + shell: pwsh + run: | + $ErrorActionPreference = 'Stop' + Get-ChildItem scripts,tests -Filter '*.ps1' -Recurse | ForEach-Object { + $tokens = $null; $parseErrors = $null + [Management.Automation.Language.Parser]::ParseFile($_.FullName, [ref]$tokens, [ref]$parseErrors) | Out-Null + if ($parseErrors.Count) { throw ($parseErrors | Out-String) } + } + - name: Test token boundaries and platform guards without ITK + shell: pwsh run: ./tests/Test-Offline.ps1 bootstrap: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository From dd2e5e5a4f86a4d19602f42921e3e8026193efdc Mon Sep 17 00:00:00 2001 From: Federico Girolami <68548715+fgirolami29@users.noreply.github.com> Date: Sun, 25 Oct 2026 06:19:01 +0100 Subject: [PATCH 2/2] ci: avoid duplicate PR pushes and cancel stale checks --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcf7446..4532b46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,9 +1,13 @@ name: Offline checks on: push: + branches: [main] pull_request: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: powershell: name: Windows PowerShell 5.1