🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versions#32
Merged
Marius Storhaug (MariusStorhaug) merged 3 commits intoJul 11, 2026
Conversation
Contributor
Author
LabelsThe following labels could not be found: Please fix the above issues or remove invalid values from |
Invoke-Pester v5.0.0 repurposed the Version and Prerelease inputs to select the Pester module version and renamed the GitHub bootstrap-module controls to GitHubVersion and GitHubPrerelease. Remap the action's Version and Prerelease inputs (which select the GitHub module) to GitHubVersion and GitHubPrerelease to preserve their documented behavior.
6d7ca22 to
49e6aae
Compare
Copilot started reviewing on behalf of
Marius Storhaug (MariusStorhaug)
July 9, 2026 23:02
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Updates this repository’s composite GitHub Action to use the newer PSModule/Invoke-Pester action (v5.1.0) while preserving the documented behavior of this action’s public Version and Prerelease inputs (i.e., still selecting the GitHub bootstrap module version, not the Pester module version).
Changes:
- Bumped the pinned
PSModule/Invoke-Pesteraction reference from v4.2.4 to v5.1.0 (by commit SHA). - Remapped this action’s
Version/Prereleaseinputs toInvoke-Pester’sGitHubVersion/GitHubPrereleaseinputs to avoid the v5 breaking-change semantics shift.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Add PesterVersion/PesterPrerelease and rename Version/Prerelease to GitHubVersion/GitHubPrerelease so Pester and GitHub module versions can be controlled independently and trickle down to the Invoke-Pester and GitHub-Script steps.
Version/Prerelease now control the PSScriptAnalyzer module (the action's namesake). A bundled prescript installs the chosen version, removes any other PSScriptAnalyzer version from the session, and imports the chosen version -Global so the tests use it instead of the runner's preinstalled copy.
Marius Storhaug (MariusStorhaug)
added a commit
to PSModule/Test-PSModule
that referenced
this pull request
Jul 11, 2026
Bumps the internal `PSModule/Invoke-Pester` action from v4.2.6 to v5.1.0, keeping this action's public `Version` and `Prerelease` inputs behaving exactly as documented. ## Changed: Invoke-Pester upgraded to v5.1.0 Invoke-Pester v5.0.0 is a major release that repurposed its `Version` and `Prerelease` inputs to select the **Pester** module version (NuGet range syntax) and renamed the GitHub bootstrap-module controls to `GitHubVersion` and `GitHubPrerelease`. This action's own `Version` and `Prerelease` inputs — documented as selecting the GitHub module version — are now wired to Invoke-Pester's `GitHubVersion` and `GitHubPrerelease`, so their behavior is unchanged for consumers. This action's public interface is unaffected. ## Technical Details - `action.yml`: bumped the pinned `PSModule/Invoke-Pester` reference to `4ff3319` (v5.1.0). - Remapped the Invoke-Pester step's `Version` → `GitHubVersion` and `Prerelease` → `GitHubPrerelease` to preserve the meaning of this action's inputs across the v5.0.0 breaking change. - The `Get test paths` step is a plain PowerShell step and does not consume these inputs, so no other change is needed. - Pester version selection is left at the v5 default (latest). - Mirrors the same change in PSModule/Invoke-ScriptAnalyzer#32. Invoke-Pester v5.0.0 release notes: https://github.com/PSModule/Invoke-Pester/releases/tag/v5.0.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bumps
PSModule/Invoke-Pesterfrom 4.2.4 to 5.1.0 and reworks the action's version inputs so callers can independently pin the three modules the action relies on — and guarantees the pinned versions are the ones actually installed and loaded.Each module now follows the same convention used by its dedicated action, where the bare
Version/Prereleasecontrols the namesake module:Version/PrereleasePesterVersion/PesterPrereleaseGitHubVersion/GitHubPrereleaseNew:
Version/Prereleasepin PSScriptAnalyzerThe action now provisions the PSScriptAnalyzer module itself instead of relying on whatever copy is preinstalled on the runner. It installs the requested version (NuGet version-range syntax, for example
[1.0.0, 2.0.0); empty installs the latest), removes any other PSScriptAnalyzer version from the session, and imports the chosen version — so the analysis runs against exactly the version you selected.New:
PesterVersion/PesterPrereleaseandGitHubVersion/GitHubPrereleaseControl the Pester module (the test runner) and the GitHub module (used to resolve paths and emit results) independently, both using NuGet version-range syntax.
Breaking Changes
VersionandPrereleasechanged meaning: they previously controlled the GitHub module; they now control PSScriptAnalyzer. Callers that pinned the GitHub module must switch toGitHubVersion/GitHubPrerelease.Before:
After:
Technical Details
action.yml:Version/Prerelease(PSScriptAnalyzer) added;PesterVersion/PesterPrereleaseandGitHubVersion/GitHubPrereleaseretained.src/Install-PSScriptAnalyzer.ps1(new): installs the requested PSScriptAnalyzer version (with PSGallery retry),Remove-Modules any loaded copy, thenImport-Module -RequiredVersion … -Globalfor the resolved version. Wired via the Invoke-Pester step'sPrescriptinput, so it runs in the same process as the analyzer run (Version/Prereleasepassed through as env).Invoke-Pesterstep bumped to v5.1.0 (SHA4ff33199141fdf22568990b6107fe3148ae93a1c): itsVersion/Prerelease(Pester) ←PesterVersion/PesterPrerelease; itsGitHubVersion/GitHubPrerelease←GitHubVersion/GitHubPrerelease.Get-TestPaths(GitHub-Script) step:Version/Prerelease←GitHubVersion/GitHubPrerelease.README.md: inputs table updated to document all six version inputs.