Skip to content

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

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

⚙️ [Maintenance]: Hard-lock Pester test dependency to 5.8.0 by GUID#42
Marius Storhaug (MariusStorhaug) merged 1 commit into
mainfrom
fix/41-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: 1 test file(s).

Fixes #41.

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.

Copilot AI review requested due to automatic review settings July 5, 2026 17:01
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

No Significant Changes Detected

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

Path Description
src/** Module source code
README.md Documentation

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Updates the Pester dependency declaration in the test suite to address discovery failures caused by a mismatched, hard-pinned Pester version when the CI runner pre-installs/imports a different version.

Changes:

  • Update #Requires -Modules in tests/AST.Tests.ps1 from Pester 5.7.1 to Pester 5.8.0 and add a module GUID pin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/AST.Tests.ps1
@@ -1,4 +1,4 @@
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.7.1' }
#Requires -Modules @{ ModuleName = 'Pester'; RequiredVersion = '5.8.0'; GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71' }
@github-actions

github-actions Bot commented Jul 5, 2026

Copy link
Copy Markdown

Super-linter summary

Language Validation result
CHECKOV Pass ✅
GITHUB_ACTIONS Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
MARKDOWN Pass ✅
NATURAL_LANGUAGE Pass ✅
POWERSHELL Pass ✅
PRE_COMMIT Pass ✅
SPELL_CODESPELL Pass ✅
TRIVY Pass ✅
YAML Pass ✅

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 52672a9 into main Jul 5, 2026
29 checks passed
@MariusStorhaug Marius Storhaug (MariusStorhaug) deleted the fix/41-hardlock-pester-5.8.0 branch July 5, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

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