⚙️ [Maintenance]: Release workflow and test suite updated to Process-PSModule v8 and Pester 6 - #110
Conversation
Move from the SHA pin on v6.1.19 to the mutable @v8 major tag and adopt the canonical v8 caller contract: - Add the push trigger on main, which v8 uses to publish stable releases. - Add the unlabeled pull_request type. - Key concurrency on the PR number or ref with cancel-in-progress: false. - Narrow permissions to contents: read, pages: write, id-token: write. - Replace the removed APIKey secret with PSGALLERY_API_KEY and the GitHubAppClientId/GitHubAppPrivateKey pair. 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. |
Rewrite tests/NerdFonts.Tests.ps1 in the Pester 6 Should-* syntax and align the requirement with the version Process-PSModule v8 installs. - Require Pester 6.1.0 instead of 6.0.0. The v8 Test-ModuleLocal workflow pins Invoke-Pester to '[6.1.0,7.0.0)', so 6.0.0 understated the floor. - Replace classic assertions with the v6 family: Should-NotBeNull, Should-Be, Should-All, Should-BeCollection, Should-Throw, Should-Invoke and Should-NotInvoke. - Drop 'Should -Not -Throw'. Pester 6 has no Should-NotThrow; the documented idiom is to call the code directly and let an unexpected exception fail the test with a real stack trace. - Use Should-NotInvoke instead of 'Should -Invoke -Times 0 -Exactly'. - Collapse the three duplicated -Variant tests into one -ForEach case. - Extract Use-TestFontData, Get-TestFont and Get-TestCacheRoot helpers so the module catalog is always restored via a single try/finally. Verified against Pester 6.1.0: 12/12 pass, PSScriptAnalyzer clean, and mutation checks confirm the suite still fails when the install-skip and variant-filter logic are broken. 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. |
The Process-PSModule caller tracks the mutable @v8 major tag, which zizmor's default blanket hash-pin policy reports as a high-severity unpinned-uses finding. Add .github/linters/zizmor.yaml with a 'PSModule/*: ref-pin' policy so first-party PSModule references may use a symbolic ref. Any other owner still falls through to the implicit '*': hash-pin rule, so third-party actions must be hash-pinned. Super-linter invokes zizmor with '--config' resolved from LINTER_RULES_PATH, so the file must be named zizmor.yaml under .github/linters. Enable the validator by dropping the VALIDATE_GITHUB_ACTIONS_ZIZMOR override, now that the workflows pass. 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. |
Enabling the zizmor validator surfaced a pre-existing dependabot-cooldown finding: the github-actions updater had no cooldown, so Dependabot used its implicit three-day default while zizmor requires seven. Set 'cooldown.default-days: 7' on the updater, which reduces the risk of pulling a compromised release before the ecosystem takes it down. Also add the document start marker and wrap the comment lines in zizmor.yaml so it passes the repository's yamllint rules. 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. |
Releases, documentation builds, and test runs for this module now go through the Process-PSModule v8 workflow, and the test suite is written in Pester 6 assertion syntax. Stable releases publish from a push to
maininstead of a merged pull request, repository writes authenticate through a GitHub App, and failing tests now name the value that did not match instead of reporting a bare expectation.Changed: Releases publish from the default branch
Publishing to the PowerShell Gallery, creating GitHub Releases, and building the documentation site run on the shared Process-PSModule reusable workflow, now tracking its
v8major tag.Stable releases are evaluated from a push to
main. A merged pull request supplies the version label and release notes, while a direct push or a manual dispatch falls back to aPatchbump with commit-based notes. Pull request runs continue to handle CI, prereleases, and prerelease cleanup, and concurrent release-capable runs queue rather than cancel each other so the Gallery, Releases, and tags are never mutated by two runs at once.Maintainers of forks or of repositories copying this workflow need three organization secrets in place —
PSGALLERY_API_KEYfor the Gallery, plusSHELLY_CLIENT_IDandSHELLY_PRIVATE_KEYfor the GitHub App that performs repository writes. TheAPIKeysecret from the v6 contract no longer exists.Full details are in Calling the workflow.
Changed: Tests report which value failed
The suite requires Pester 6.1.0, matching the version the release workflow installs, and asserts through the Pester 6
Should-*commands.A contributor who breaks the variant filter or the already-installed skip now sees the specific font files that failed the check, rather than a generic assertion message. Cases that must complete without error call the command directly, so an unexpected exception arrives with its own stack trace and line number. Running the suite locally needs Pester 6.1.0 or newer:
Changed: GitHub Actions security scanning enforced
Workflow files are audited by zizmor for GitHub Actions security issues. Tracking the shared Process-PSModule workflow by its
v8major tag conflicts with a blanket policy requiring every reference to be pinned to a commit hash.A repository policy allows references to first-party
PSModule/*workflows and actions to use a symbolic tag, while every other owner must be pinned to a full commit hash. Contributors adding a third-party action still need a hash pin, and the scan runs as part of the standard linter job.PSModule/*ref-pinhash-pinChanged: Dependabot waits before proposing an update
Dependabot opens dependency update pull requests as soon as a new release appears, and an opportunistic package compromise is usually withdrawn within days of publication.
The GitHub Actions updater waits seven days after a release before proposing it, so an update that is pulled by the ecosystem never reaches a pull request here. Updates still arrive on the existing weekly schedule.
Technical details
.github/workflows/Process-PSModule.yml@v8tag, replacing the SHA pin onbf67cd9(v6.1.19).pushtrigger onmain, which v8 requires to publish stable releases, and theunlabeledpull request type.github.event.pull_request.number || github.refwithcancel-in-progress: false, keeping a pull request distinct from a default-branch push.permissionstocontents: read,pages: write,id-token: write. From v7 onward a GitHub App installation token performs repository writes, socontents: write,pull-requests: write, andstatuses: writeare no longer needed ongithub.token.tests/NerdFonts.Tests.ps1#Requiresmoves from Pester6.0.0to6.1.0, matching the[6.1.0,7.0.0)range that v8'sTest-ModuleLocal.ymlpasses toPSModule/Invoke-Pester.Should-NotBeNull,Should-Be,Should-All,Should-BeCollection,Should-Throw,Should-Invoke,Should-NotInvoke.Should-NotThrow, soShould -Not -Throwbecomes a bare call — the idiom Pester's owntst/functions/assert/suite uses.Should -Invoke -Times 0 -ExactlybecomesShould-NotInvoke.-Varianttests collapse into one-ForEachcase, andUse-TestFontData,Get-TestFont, andGet-TestCacheRootreplace five repeated try/finally blocks. Net 40 lines removed, same 12 tests.Should-NotBeNullis not equivalent toShould -Not -BeNullOrEmpty— it passes on an empty string — so each assertion was converted individually rather than mechanically substituted..github/linters/zizmor.yamland.github/PSModule.ymlunpinned-usespolicy requires hash-pinning on every action; since v1.20.0 that applies to first-party namespaces too. The@v8caller therefore reports as a high-severity finding.rules.unpinned-uses.config.policieswith a singlePSModule/*: ref-pinentry. Unmatched clauses fall through to zizmor's implicit'*': hash-pinrule, so no third-party action is exempted.zizmor.yaml: super-linter builds the command aszizmor --config "${GITHUB_ACTIONS_ZIZMOR_LINTER_RULES}", resolved fromLINTER_RULES_PATH(default.github/linters) with a default filename ofzizmor.yaml. Zizmor's own discovery paths (.github/zizmor.yml,zizmor.yml) are not consulted when--configis passed.VALIDATE_GITHUB_ACTIONS_ZIZMOR: falseis dropped from the linter env, enabling the audit now that the workflows pass it..github/dependabot.ymldependabot-cooldownfinding (medium): the updater declared nocooldown, so Dependabot applied its implicit three-day default while zizmor'srules.dependabot-cooldown.config.daysthreshold is seven. The audit had never run before because the validator was disabled.cooldown.default-days: 7resolves it. The finding was pre-existing rather than introduced here; it became visible only once zizmor ran.zizmor.yamlalso carries a---document start and wrapped comments, so it satisfies the repository's yamllintdocument-startand 80-characterline-lengthrules.Verification
The full linter job passes in CI, with super-linter confirming it loads the user-provided config and reporting
Successfully linted GITHUB_ACTIONS_ZIZMOR. Locally, zizmor reports no findings on the workflows and Dependabot config, and still errors onactions/checkout@v5and a third-party@v1reference in a scratch workflow, confirming the policy is scoped rather than blanket. Ran against a locally built module with Pester 6.1.0 and theFontsandAdmindependencies: 12 of 12 tests pass, PSScriptAnalyzer reports nothing using this repository's.github/linters/.powershell-psscriptanalyzer.psd1. Two mutations confirm the suite still catches regressions: removing the already-installedcontinuefails both skip tests, and dropping theNerdFontMonoexclusion from the Standard variant filter fails only the Standard case, naming the four unexpected files.Should.DisableV5is set nowhere in the PSModule toolchain, so the classic syntax was not failing — the rewrite is a deliberate style move, not a forced fix..github/workflows/Update-FontsData.ymlwas reviewed and left unchanged: it authenticates with the repository's ownNERDFONTS_UPDATER_BOT_CLIENT_IDandNERDFONTS_UPDATER_BOT_PRIVATE_KEYthroughPSModule/GitHub-Scriptand is independent of the Process-PSModule contract.src/carries no changes, keeping clear of the parallelInstall-NerdFont -Forcedefect work in #109.End-to-end v8 pipeline validation
ImportantFilePatterns(^src/,^README\.md$) means a change confined to.github/**andtests/**skips the build, test, and publish stages, so pull request CI alone does not exercise them. A manualworkflow_dispatchrun on this branch validated the full path: every stage green,Pester v6.1.0with 12 of 12 tests passing on Linux, macOS, and Windows, code coverage 94.78% against the 85% target, andBuild-SitereportingBuild Config Type: zensical.toml.Publish-ModuleandPublish-Sitecorrectly stayed skipped, since the branch is not the default branch.Contract alignment was checked against the
v8.0.3sources rather than the docs alone: all threeworkflow_callsecrets are declaredrequired: trueand all three are supplied;Get-PSModuleSettingsresolves releases throughIsPushToDefaultBranch, which thepushtrigger provides;unlabeledis among the accepted pull request actions; the reusable workflow declares the same three permissions; andStructure-Siteaccepts onlyzensical.toml, which this repository provides.Invoke-Pesterreceives[6.1.0,7.0.0), matching the test file's requirement exactly.Standards and framework alignment
.github/workflows/**tests/**(PowerShell).github/linters/**(zizmor).github/dependabot.ymlIssue convergence sweep
Swept the four open issues in this repository. #109 (
-Forcedefect), #78 (Install-NerdFont follow-ups), #62 (#Requires -PSEdition Core), and #35 (DSC integration) all requiresrc/changes and are not satisfied by this diff, which touches only the workflow and the test file. No additional issues are closed.Relevant issues (or links)
Related work