Release automation runs on Process-PSModule v8 with a Zensical documentation site and a Pester 6 test suite - #299
Conversation
Adopt the canonical v8 caller from the Process-PSModule v8.0.3 docs, moving from the SHA pinned v6.1.4 across the v7 and v8 breaking changes. 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. |
The file already required Pester 6 but its body was still classic v5 syntax. Move to the v6 Should-* assertions and align the requirement with the Process-PSModule v8 convention of 6.1.0. - Should -Not -BeNullOrEmpty -> Should-NotBeNull - Should -Not -Throw -> direct call (no Should-NotThrow in v6) Verified with Pester 6.1.0 and Should.DisableV5 = $true, which rejects any remaining classic syntax. All 3 tests 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. |
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. |
1 similar comment
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. |
Process-PSModule v8 builds the documentation site with Zensical and resolves its config from .github/zensical.toml, docs/zensical.toml, or zensical.toml. No v8 action or workflow reads mkdocs.yml, so the docs build would fail on the missing config. Carry every setting from the mkdocs.yml site definition into the Zensical TOML schema and remove the file it replaces. 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. |
The default ImportantFilePatterns match only ^src/ and ^README.md$, so a change to the workflow caller, the site config, the settings file, or the tests never enters the build, test, and publish path and ships without being exercised. List those paths alongside the two defaults, which the setting replaces in full. Disable the zizmor GitHub Actions linter to match the current module template, and point the reference comment at the settings page now that the README anchor it named is gone. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Release automation for this module runs on the Process-PSModule v8 contract, so builds, tests, documentation publishing, and PowerShell Gallery releases follow the current pipeline and track the v8 major without a pin update for every patch release. The documentation site builds with Zensical from a configuration the pipeline reads, the test suite is written in the type-aware Pester 6 assertion syntax, and changes to the automation itself run through the same build, test, and publish path as changes to the module.
A contributor running the test suite needs Pester 6.1.0 or later within the 6 major, and anyone adjusting the documentation site edits its Zensical configuration rather than a MkDocs one.
Breaking: Pester 6.1 test framework floor
The test suite resolves its framework from the Pester module available on the machine that runs it, and the reusable test runner installs from the
[6.1.0,7.0.0)range.Test files require Pester 6.1.0 or later within the 6 major, so patch and minor releases resolve automatically while a new major stays a deliberate change.
#Requires -Modules @{ ModuleName = 'Pester'; ModuleVersion = '6.1.0'; MaximumVersion = '6.*' }ModuleNamePesterModuleVersion6.1.0MaximumVersion6.*Changed: Zensical documentation site configuration
The pipeline builds the documentation site with Zensical and reads its configuration from
.github/zensical.toml,docs/zensical.toml, orzensical.toml.Site configuration lives in
.github/zensical.toml, carrying the site identity, theme variant, colour palette, navigation and search behaviour, Markdown extensions, social links, and cookie-consent notice. The pipeline substitutes the repository owner and module name into the placeholder values and sets the output directory when it builds.site_name-{{ REPO_NAME }}-, replaced with the module namerepo_urltheme.variantclassicclassictheme.featurestheme.paletteRead more in the Process-PSModule repository setup guide.
Changed: Release automation on the Process-PSModule v8 contract
Publishing a module release writes to the PowerShell Gallery, GitHub Releases, and repository tags, so the automation needs credentials for each and no more permission than those operations require.
The caller workflow tracks the
v8major tag and supplies gallery and GitHub App credentials through the v8 secret contract, so a GitHub App installation token performs repository writes and the workflow token holds only read access to repository contents alongside the Pages and OIDC permissions the documentation site needs.PSGALLERY_API_KEYGitHubAppClientIdSHELLY_CLIENT_IDorganisation secretGitHubAppPrivateKeySHELLY_PRIVATE_KEYorganisation secretTestDataRead more in the Process-PSModule guide to calling the workflow.
Changed: Stable releases publish from a default-branch push
A release-capable run mutates the PowerShell Gallery, GitHub Releases, and tags, so an interrupted run leaves those targets inconsistent.
A push to
mainproduces the stable release, pull request events drive continuous integration, prereleases, and prerelease cleanup, and concurrency keys on the pull request number where one exists and the ref otherwise, so a pull request stays distinct from a default-branch push and a queued run waits for a release in flight instead of cancelling it.Changed: Automation and test changes enter the release path
The build, test, and publish stages run only for a change that matches the repository's important-file patterns, and the shipped defaults match module source and the README alone.
Changes to the test suite, the workflow caller, the site configuration, and the settings file enter the build, test, and publish path alongside changes to module source, so a change to the automation is exercised by the pipeline it governs.
^src/^README\.md$^tests/^\.github/PSModule\.yml$^\.github/zensical\.toml$^\.github/workflows/Changed: Type-aware assertions in the test suite
Pester 6 assertions are specialised by the type and shape of the value under test, and report a failure against the value they actually received.
The suite asserts through the
Should-*family, so a failure names the offending value and the pipeline shaping behind it, and the suite passes with the classic assertion syntax disabled.Technical details
.github/workflows/Process-PSModule.ymlcarries the caller body from the Process-PSModule v8 documentation, referencingworkflow.yml@v8. The mutable major tag is deliberate for this caller, so the SHA-pinning convention that applies to third-party actions elsewhere in the repository does not apply here. Workflow permissions arecontents: read,pages: write, andid-token: write;pull_requesttypes includeunlabeledalongsideclosed,opened,reopened,synchronize, andlabeled. All three secrets the reusable workflow declares as required are mapped, and it declares no other required secret or input.Template-PSModulecurrently ships a caller with job-level permissions andcancel-in-progresskeyed on the event name, which differs from the form above. The published documentation on the default branch matches this caller, and v8.0.3 is the current release, so the documentation is followed as the source of truth..github/zensical.tomlis byte-identical to the v8.0.3 template, which is the upstream default for a module repository and already matches every setting the previous MkDocs definition carried. Verified field by field: site identity,language,logo,favicon, all three palette entries includingscheme,primary,accent, and toggle labels, both social links, and the consent title, description, and actions all match. Two deltas come from the template: the theme font selection is absent, since the Zensicalclassicvariant sets its own typography, andcontent.code.copyis added to the feature list. Theme selection moves fromtheme.name = materialtotheme.variant = "classic", the repository icon tofontawesome/brands/github, and the palette toggle icons to thelucideset.site_diris intentionally absent because the pipeline injects it after the[project]header, which requires that header to stay on its own line. The MkDocs configuration is removed; no v8 action or workflow reads it, and no reference to it remains in the repository..github/PSModule.ymlsetsImportantFilePatterns, which replaces the defaults in full rather than extending them, so^src/and^README\.md$are repeated alongside the added paths. Verified that every file this change touches matches a pattern.VALIDATE_GITHUB_ACTIONS_ZIZMORis disabled to match the current module template. The reference comment moves to the settings page because the README anchor it named no longer exists in v8. Every other setting in the file, includingTest.CodeCoverage.PercentTarget, remains valid against the v8 settings contract.tests/GoogleFonts.Tests.ps1asserts withShould-NotBeNullin place ofShould -Not -BeNullOrEmpty. Piping unwraps input, so an empty collection reaches the assertion as$nulland fails it; this holds for@(),@(1), and multi-item input. Pester 6 offers noShould-NotThrowcounterpart toShould-Throw, so the install assertion calls the command directly and an exception fails the test, surfacing the real exception rather than a wrapper message. The disabled bulk-install test carries the same syntax so it stays valid when enabled. Both public commands have tests, satisfying theFunctionTestframework check.Validation: all three tests pass against Pester 6.1.0 with the module built and imported locally, run with
Should.DisableV5 = $trueso any classic assertion throws. That guard rejects a probe file asserting1 | Should -Be 1, confirming it is not vacuous.Invoke-ScriptAnalyzerreports clean against.github/linters/.powershell-psscriptanalyzer.psd1. The Zensical configuration parses as TOML and the settings file as YAML..github/workflows/Update-FontsData.ymlis unaffected and untouched. It runsPSModule/GitHub-Scriptwith the repository's ownGOOGLEFONTS_UPDATER_BOT_CLIENT_ID,GOOGLEFONTS_UPDATER_BOT_PRIVATE_KEY, andGOOGLE_DEVELOPER_API_KEYsecrets and takes no part in the Process-PSModule caller contract.Out of scope: module source,
.github/dependabot.yml, Dependabot secret configuration, theInstall-GoogleFont -Forcedefect, and the pinnedFontsandAdmindependency versions. The repository standard also expectsCONTRIBUTING.md,SECURITY.md,SUPPORT.md,CODE_OF_CONDUCT.md,AGENTS.md,CLAUDE.md,.github/release.yml, and.github/pull_request_template.md, none of which this repository carries; no framework test enforces them, so they are left for separate changes.Related references