Testing Scripts and Running Them in CI: Pester 6, PSScriptAnalyzer, Cross-Platform and Moving from 5.1 to 7.x
In GitHub Actions, a shell: pwsh step only adds $ErrorActionPreference = 'stop'; even if dotnet test fails in the middle, the step stays green when the last native command returns 0, so keep the run block a single script call. Pester 6 tests and mocks for Bookstore.Ops, PSScriptAnalyzer rules, a Windows and Ubuntu matrix, cross-platform traps, and the differences when moving from 5.1 to 7.x and from 7.6 to 7.7.
15 Nov 2026
·
16 min
·
6