Release pipeline runs Process-PSModule v8 and tests run on Pester 6 - #69
Open
Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
Open
Release pipeline runs Process-PSModule v8 and tests run on Pester 6#69Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
Marius Storhaug (MariusStorhaug) wants to merge 2 commits into
Conversation
Adopt the canonical v8 caller from the Process-PSModule v8.0.3 docs, replacing the v5.5.0 pin. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
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. |
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
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. |
Adopt the Pester 6.1.x Should-* assertions and add the version guard required by the Process-PSModule v8 test contract. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
No Significant Changes DetectedThis PR does not contain changes to files that would trigger a new release:
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. |
Marius Storhaug (MariusStorhaug)
marked this pull request as ready for review
August 27, 2026 21:01
Marius Storhaug (MariusStorhaug)
requested a review
from a team
as a code owner
August 27, 2026 21:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every release of this module flows through the Process-PSModule v8 pipeline, which publishes a stable release from a push to
mainand authenticates repository writes with a GitHub App installation token instead of broadgithub.tokenpermissions. The module's Pester suite runs on Pester 6.1.x and uses the Pester 6Should-*assertion family, matching the range the pipeline resolves for its own runs.A contributor needs Pester 6.1.x available locally to run
tests/Fonts.Tests.ps1, and the caller workflow suppliesPSGALLERY_API_KEY,GitHubAppClientId, andGitHubAppPrivateKeyexplicitly from PSModule organization secrets. Anyone installing and using theFontsmodule is unaffected: the module's functions, parameters, and behaviour are untouched.Breaking: Pester 6.1.x requirement for the test suite
The assertion syntax a test file uses determines which Pester majors can execute it, and a suite that mixes syntaxes across a version boundary fails in ways that look like product defects.
tests/Fonts.Tests.ps1declares its Pester requirement at the top of the file and asserts withShould-NotBeNullandShould-BeNull, so the suite runs on Pester 6.1.x up to but excluding 7.0.0. Pester 6 offers noShould-NotThrow, so the tests invokeInstall-FontandUninstall-Fontdirectly and let an unhandled exception fail the test, which surfaces the real error at its own line.#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.1.0'; MaximumVersion = '6.*' }Changed: Release pipeline on Process-PSModule v8
The caller workflow governs which events reach the shared pipeline, which permissions a run holds, and which credentials it receives, and a v8 pipeline evaluates a stable release from a default-branch push rather than from a merged pull request.
.github/workflows/Process-PSModule.ymltracks thev8major tag, so the repository follows the major automatically. It triggers on a push tomainfor stable releases and keeps thepull_requesttrigger for CI, prereleases, and prerelease cleanup. Its concurrency key separates a pull request from a default-branch push and queues rather than cancels, because a release-capable run mutates the PowerShell Gallery, GitHub Releases, and tags.github.tokenholds onlycontents: read,pages: write, andid-token: write, since the GitHub App installation token performs repository writes.PSGALLERY_API_KEYGitHubAppClientIdGitHubAppPrivateKeyTestDatasecretsandvariablesmapsThe calling the workflow guide covers the full caller contract, and writing module tests covers the Pester requirement and test discovery.
Technical details
The caller workflow body is verbatim from the v8.0.3 docs, checked against the
v8.0.3ref rather than reconstructed from the release notes. v7.0.0 moved repository writes onto a GitHub App installation token, which is what allows the narrowed permission set; v8.0.0 moved stable-release evaluation onto the default-branch push, which is what makes thepush:trigger mandatory rather than optional.secrets: inheritis dropped because the v8 guide states explicit mapping is the contract and inheritance is not a substitute. All three secrets already exist at PSModule organization level.The pipeline pins its
Invoke-Pesterruns to[6.1.0,7.0.0), so the file's#Requiresguard mirrors the range the runner resolves.Should-NotBeNullandShould-BeNullwere verified against Pester 6.1.0 to treat an empty collection as null, which makes them faithful replacements for theBeNullOrEmptychecks the suite relied on — an emptyGet-Fontresult still satisfiesShould-BeNull. Replacing the{ ... } | Should -Not -Throwwrappers also repaired the$fontsassignments, which were scoped to the throwaway scriptblocks and never observable.Validation: the file parses clean, Pester 6.1.0 discovers all 10 tests, and a full run against the module source on macOS passes 10 of 10 with the installed test font cleaned up afterwards.
Invoke-ScriptAnalyzerwith.github/linters/.powershell-psscriptanalyzer.psd1reports no findings. Test names, structure, and coverage are identical, so the suite change is syntax only.Out of scope and deliberately untouched:
.github/dependabot.ymland Dependabot secrets, and everything undersrc/, where a separate effort addresses anInstall-Font -Forcedefect.