🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versions (#32)
Bumps PSModule/Invoke-Pester from 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/Prerelease controls the namesake module:
| Input | Controls |
|---|---|
Version / Prerelease |
PSScriptAnalyzer (this action's namesake module) |
PesterVersion / PesterPrerelease |
Pester |
GitHubVersion / GitHubPrerelease |
GitHub module |
New: Version / Prerelease pin PSScriptAnalyzer
The 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 / PesterPrerelease and GitHubVersion / GitHubPrerelease
Control 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
Version and Prerelease changed meaning: they previously controlled the GitHub module; they now control PSScriptAnalyzer. Callers that pinned the GitHub module must switch to GitHubVersion / GitHubPrerelease.
Before:
- uses: PSModule/Invoke-ScriptAnalyzer@v1
with:
Version: '[1.2.0, 2.0.0)' # was the GitHub module
Prerelease: 'true'After:
- uses: PSModule/Invoke-ScriptAnalyzer@v2
with:
Version: '[1.0.0, 2.0.0)' # PSScriptAnalyzer
GitHubVersion: '[1.2.0, 2.0.0)' # GitHub module
PesterVersion: '[6.0.0, 7.0.0)' # PesterTechnical 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.