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

@dependabot dependabot Bot commented on behalf of github May 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:

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)'    # 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

dependabot Bot commented on behalf of github May 25, 2026

Copy link
Copy Markdown
Contributor Author

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.

@dependabot dependabot Bot 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 49e6aae Compare July 9, 2026 22:59
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title Bump PSModule/Invoke-Pester from 4.2.4 to 4.2.5 Bump PSModule/Invoke-Pester from 4.2.4 to 5.1.0 Jul 9, 2026

Copilot AI 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.
@MariusStorhaug Marius 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 inputs Jul 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.
@MariusStorhaug Marius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: Separate Pester and GitHub version and prerelease inputs 🌟 [Major]: Control PSScriptAnalyzer, Pester, and GitHub module versions Jul 11, 2026
@MariusStorhaug Marius Storhaug (MariusStorhaug) merged commit 4d633e4 into main Jul 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
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file Major

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants