Skip to content

🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versions - #32

Merged
Marius Storhaug (MariusStorhaug) merged 3 commits into
mainfrom
dependabot/github_actions/PSModule/Invoke-Pester-4.2.5
Jul 11, 2026
Merged

🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versions#32
Marius Storhaug (MariusStorhaug) merged 3 commits into
mainfrom
dependabot/github_actions/PSModule/Invoke-Pester-4.2.5

Conversation

@dependabot

@dependabotdependabotBot commented on behalf of githubMay 25, 2026

Copy link
Copy Markdown
Contributor

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:

InputControls
Version / PrereleasePSScriptAnalyzer (this action's namesake module)
PesterVersion / PesterPrereleasePester
GitHubVersion / GitHubPrereleaseGitHub 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@v1with:
Version: '[1.2.0, 2.0.0)'# was the GitHub modulePrerelease: 'true'

After:

- uses: PSModule/Invoke-ScriptAnalyzer@v2with:
Version: '[1.0.0, 2.0.0)'# PSScriptAnalyzerGitHubVersion: '[1.2.0, 2.0.0)'# GitHub modulePesterVersion: '[6.0.0, 7.0.0)'# Pester

Technical Details

  • action.yml: Version/Prerelease (PSScriptAnalyzer) added; PesterVersion/PesterPrerelease and GitHubVersion/GitHubPrerelease retained.
  • src/Install-PSScriptAnalyzer.ps1 (new): installs the requested PSScriptAnalyzer version (with PSGallery retry), Remove-Modules any loaded copy, then Import-Module -RequiredVersion … -Global for the resolved version. Wired via the Invoke-Pester step's Prescript input, so it runs in the same process as the analyzer run (Version/Prerelease passed through as env).
  • Invoke-Pester step bumped to v5.1.0 (SHA 4ff33199141fdf22568990b6107fe3148ae93a1c): its Version/Prerelease (Pester) ← PesterVersion/PesterPrerelease; its GitHubVersion/GitHubPrereleaseGitHubVersion/GitHubPrerelease.
  • Get-TestPaths (GitHub-Script) step: Version/PrereleaseGitHubVersion/GitHubPrerelease.
  • README.md: inputs table updated to document all six version inputs.

Note
Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

@dependabot@github

dependabotBot commented on behalf of githubMay 25, 2026

Copy link
Copy Markdown
ContributorAuthor

Labels

The following labels could not be found: github-actions. Please create it before Dependabot can add it to a pull request.

Please fix the above issues or remove invalid values from dependabot.yml.

@dependabotdependabotBot added dependencies Pull requests that update a dependency file Patch labels May 25, 2026
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.
@MariusStorhaug
Marius Storhaug (MariusStorhaug)force-pushed the dependabot/github_actions/PSModule/Invoke-Pester-4.2.5 branch from 6d7ca22 to 49e6aaeCompareJuly 9, 2026 22:59
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title Bump PSModule/Invoke-Pester from 4.2.4 to 4.2.5Bump PSModule/Invoke-Pester from 4.2.4 to 5.1.0Jul 9, 2026

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-Pester action reference from v4.2.4 to v5.1.0 (by commit SHA).
  • Remapped this action’s Version/Prerelease inputs to Invoke-Pester’s GitHubVersion/GitHubPrerelease inputs 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.
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title Bump PSModule/Invoke-Pester from 4.2.4 to 5.1.0🌟 [Major]: Separate Pester and GitHub version and prerelease inputsJul 10, 2026
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.
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: Separate Pester and GitHub version and prerelease inputs🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versionsJul 11, 2026
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 4d633e4 into mainJul 11, 2026
21 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the dependabot/github_actions/PSModule/Invoke-Pester-4.2.5 branch July 11, 2026 13:45
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependenciesPull requests that update a dependency fileMajor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@MariusStorhaug