Skip to content

⚙️ [Maintenance]: Hard-lock Pester test dependency to 5.8.0 by GUID - #637

Merged
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
fix/636-hardlock-pester-5.8.0
Jul 5, 2026
Merged

⚙️ [Maintenance]: Hard-lock Pester test dependency to 5.8.0 by GUID#637
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
fix/636-hardlock-pester-5.8.0

Conversation

@MariusStorhaug

Copy link
Copy Markdown
Member

Hard-locks the Pester test dependency to an exact version pinned by module GUID, replacing the RequiredVersion = '5.7.1' pin that broke test discovery when the runner installed Pester 5.8.0.

#Requires -Modules@{ ModuleName='Pester'; RequiredVersion='5.8.0'; GUID='a699dea5-2c73-4616-a270-1f7abb777e71' }

Why 5.8.0 + GUID

  • Exact version = reproducible and supply-chain-safe (no silent drift to a newer or compromised release).
  • GUID pins module identity (anti-name-squat). Both the version and the GUID are enforced by PowerShell at discovery time (verified locally).
  • No version comment — unlike a GitHub Actions @<sha>, RequiredVersion already states the version in plain text, and #Requires rejects a GUID without a version key.

Files updated: 17 test file(s).

Fixes#636.

Note

This pin fully holds once Invoke-Pester installs the pinned version instead of the latest (today it installs newest, so a future Pester release would re-break exact pins). Tracked in PSModule/Invoke-Pester#68. Part of the dependency-management epic PSModule/Process-PSModule#356.

@github-actions

Copy link
Copy Markdown
Contributor

No Significant Changes Detected

This PR does not contain changes to files that would trigger a new release:

PatternDescription
^src/Matches files where path matches this pattern
^README\.md$Matches files where path matches this pattern

Build, test, and publish stages will be skipped for this PR.

If you believe this is incorrect, please verify that your changes are in the correct locations.

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

This PR updates the repository’s Pester dependency requirement in test scripts to restore reliable Pester discovery in CI, addressing the version conflict described in #636 by pinning to Pester 5.8.0 and additionally locking module identity via the Pester module GUID.

Changes:

  • Replace #Requires pins from Pester 5.7.1 to 5.8.0 across all affected test files.
  • Add the Pester module GUID to the #Requires -Modules specification to enforce module identity at discovery time.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
tests/Actions.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Apps.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Artifacts.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Emojis.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Enterprise.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Environments.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/GitHub.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/GitHubFormatter.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Organizations.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Permissions.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Releases.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Repositories.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Secrets.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Teams.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/TEMPLATE.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Users.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID
tests/Variables.Tests.ps1Pin Pester #Requires to 5.8.0 and lock by GUID

@github-actions

Copy link
Copy Markdown
Contributor

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNPass ✅
NATURAL_LANGUAGEPass ✅
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

All files and directories linted successfully

For more information, see the GitHub Actions workflow run

Powered by Super-linter

@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 7e05e25 into mainJul 5, 2026
42 of 43 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the fix/636-hardlock-pester-5.8.0 branch July 5, 2026 23:03
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

Test discovery fails: pinned Pester 5.7.1 conflicts with installed Pester 5.8.0

2 participants

@MariusStorhaug