Skip to content

Upgrade Process-PSModule to Pester 6.1 - #519

Merged
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
update-pester-framework
Aug 15, 2026
Merged

Upgrade Process-PSModule to Pester 6.1#519
Marius Storhaug (MariusStorhaug) merged 7 commits into
mainfrom
update-pester-framework

Conversation

@MariusStorhaug

@MariusStorhaug Marius Storhaug (MariusStorhaug) commented Aug 15, 2026

Copy link
Copy Markdown
Member

Implemented in Process-PSModule

  • Enforce the Pester [6.1.0,7.0.0) range in reusable framework test runs.
  • Align module-local workflow inputs with the current Invoke-Pester contract: Version/Prerelease select Pester, while GitHubVersion/GitHubPrerelease select the GitHub module. Pester prerelease remains at the action default.
  • Keep the six Test-PSModule container/test files inside the action implementation at .github/actions/Test-PSModule/src/tests, because they are context-dependent framework suites executed against the compiled module or source tree. Discovery remains $PSScriptRoot/tests/$settings.
  • Add a framework CI contract test that validates Pester 6.1 configuration properties:
    • Run.Shuffle
    • Run.ShuffleSeed
    • Run.Parallel
    • Run.ParallelThrottleLimit
    • Debug.ShowStartMarkers
  • Align coverage input documentation with Pester 6.1: supported formats are JaCoCo and Cobertura, and profiler-based tracing is documented correctly.
  • Update Pester 6.1 authoring and coverage-report guidance.

Pester 6.1 runtime audit

A local Pester 6.1 probe generated a passing test result and coverage report, and the Get-PesterCodeCoverage action processed that JSON successfully. The coverage result shape remains compatible: CoveragePercent, CoveragePercentTarget, CommandsMissed, CommandsExecuted, FilesAnalyzed, and all count properties are present and consumed correctly.

The Pester result still exposes Containers; each container retains Data, Blocks, and aggregate result/count properties. The existing container files therefore remain compatible with the compiled-module/source-tree execution model.

Contract findings and required upstream follow-up

The current PSModule/Invoke-Pester v5.1.0 action does not expose these Pester configuration properties as action inputs, so this repository deliberately does not add incompatible passthrough mappings:

  • Run_Shuffle
  • Run_ShuffleSeed
  • Run_Parallel
  • Run_ParallelThrottleLimit
  • Debug_ShowStartMarkers

The coordinated PSModule/Invoke-Pester follow-up must add each input to action.yml, forward each PSMODULE_INVOKE_PESTER_INPUT_* environment variable, map them into the generated PesterConfiguration, and publish a version/tag that Process-PSModule can pin. Process-PSModule can then expose the corresponding reusable-action inputs and pass them through.

Test and fixture boundaries confirmed

  • Module-local tests assume the built module is already loaded: Test-ModuleLocal.yml imports the artifact in its prescript before invoking Pester.
  • Framework module tests import the module explicitly in their own test scopes; no implicit preload was introduced.
  • PSD1 files in the repository test fixture (src/data/Config.psd1 and src/data/Settings.psd1) are not implicitly loaded and are currently unused. Any future PSD1 dataset test must call Import-PowerShellDataFile explicitly or load it from supported setup.
  • Expose-TestData passes only explicit caller-provided fixtures as environment variables to setup, teardown, and tests.
  • Module linting remains a separate Invoke-ScriptAnalyzer job and artifact path; it is not folded into Pester execution.

Validation

  • Pester 6.1 configuration contract validated locally.
  • Pester 6.1 result/container and coverage shapes inspected locally.
  • Get-PesterCodeCoverage executed against a generated Pester 6.1 coverage JSON fixture and passed.
  • Restored Test-PSModule scripts parsed successfully.
  • Test-PSModule path resolution validated from a consumer repository root.
  • Changed PowerShell parsed successfully.
  • git diff --check passed.

Commits: 337533c, ad2961e, 8c3366f, 0423d6a

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 15, 2026

Copy link
Copy Markdown

Super-linter summary

Language Validation result
CHECKOV Pass ✅
CSS Pass ✅
CSS_PRETTIER Pass ✅
GITHUB_ACTIONS Pass ✅
GITHUB_ACTIONS_ZIZMOR Pass ✅
GITLEAKS Pass ✅
GIT_MERGE_CONFLICT_MARKERS Pass ✅
HTML Pass ✅
JAVASCRIPT_ES Pass ✅
JAVASCRIPT_PRETTIER 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

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review August 15, 2026 15:55
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit 16419d0 into main Aug 15, 2026
79 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the update-pester-framework branch August 15, 2026 18:34
Marius Storhaug (MariusStorhaug) added a commit to PSModule/Template-PSModule that referenced this pull request Sep 5, 2026
New modules created from this template start with the current
Process-PSModule v8 test and documentation contract, a repository-local
contribution guide, and centrally managed PSModule community policies.
The template's scheduled framework run returns to green.

## Fixed: Current Process-PSModule compatibility

The starter test requires Pester 6.1.0 while retaining the supported 6.x
range. The starter public function links first to its generated online
reference, as required by the framework source test.

## Changed: Generated documentation design

Generated module sites now share the portable typography, icons,
palettes, navigation, search, content, plugin, and Markdown-extension
settings from MSXOrg/docs. Explicit navigation remains absent, so
Zensical derives index-first, alphabetical navigation from the generated
folder tree. Cookie consent is not part of the generated-module
template.

## Changed: Repository and organization guidance have explicit owners

The repository owns `.github/CONTRIBUTING.md`. Code of Conduct,
security, and support policies remain centrally managed by
`PSModule/.github` and are linked rather than copied. Process-PSModule
owns module releases, so the template no longer carries unused GitHub
generated-release-notes configuration.

---
<details>
<summary>Technical details</summary>

- Raises the starter test's minimum Pester version from 6.0.0 to 6.1.0.
- Adds the canonical generated documentation URL to the starter
function's comment-based help.
- Aligns `.github/zensical.toml` with `MSXOrg/docs` at
`bc6c212b1da6872424543cc6c4d249b1b1f8a845`, with MSX settings taking
precedence over Process-PSModule differences.
- Enables `navigation.indexes` while keeping manual `nav` absent.
- Keeps generated-site exceptions explicit: no source edit/view actions,
`custom_dir`, JavaScript/CSS assets, `watch`, snippets, or
`[project.extra.consent]`. Cookie consent is intentionally not part of
generated module sites.
- Restricts placeholders to repository identity and content-specific
values.
- Moves `CONTRIBUTING.md` to `.github/CONTRIBUTING.md`, updates
repository links, and aligns its workflow references with current MSX
guidance.
- Links the Code of Conduct, security policy, and support guidance from
the centrally managed `PSModule/.github` source; no local policy
overrides are included.
- Removes `.github/release.yml` because Process-PSModule owns release
generation and does not use GitHub generated release notes.
`.github/PSModule.yml` remains the repository-local workflow settings
surface.
- GitHub's branch contents API resolves `.github/CONTRIBUTING.md` and
`.github/PSModule.yml` and confirms the local policy files, root
contribution duplicate, and `.github/release.yml` are absent.
- Preserves the exact v8 caller workflow, with no `TestData` payload
required.
- Migration inventory: one module-local test file, no external fixtures,
no mocks, no data-driven cases, and no setup or teardown scripts.
- Local validation: Pester 6.1.0 passed; PSScriptAnalyzer 1.25.0
reported no findings; the pinned MSX TOML contract comparison,
codespell, relative-link checks, central-policy link checks, and
file-ownership checks passed; a staged Zensical 0.0.50 build completed
with only the pre-existing README-link warnings tracked by
PSModule/Process-PSModule#523.
- Hosted validation: the full Process-PSModule build, site, source,
module, module-local, lint, result, coverage, and CodeQL checks passed
on Linux, macOS, and Windows at `d92cdc6`.
- Final Copilot review at `d92cdc6` covered all eight changed files and
generated no new comments. Its suppressed quickstart-link note is
already owned by #42 and is not added to this
scope.
- Copilot's earlier scaffold-link concern cannot use the suggested
placeholder without failing the framework's exact-link test; the
initialization gap is recorded separately in
#56, and the review thread is resolved.
- Overlap review: #42 edits the deleted root
contributing guide and needs reconciliation.
#49 also removes `.github/release.yml`, but
its proposed CODEOWNERS and pull-request-template deletions are not
adopted. #50 and #51
remain independent, although #51 touches the same AGENTS link line.
- Issue convergence sweep: the finished diff fully satisfies
#52, #54, and
#55; no other open template issue is completed
by this scope.

| Changed surface | Standards checked | Framework docs checked | Result
|
| --- | --- | --- | --- |
| `tests/**` | MSX PowerShell testing | Process-PSModule Pester 6.1
migration | Fixed in this PR |
| `src/functions/public/**` | MSX PowerShell functions and comment-based
help | Process-PSModule source test contract | Fixed in this PR |
| `.github/zensical.toml` | MSX documentation design | Process-PSModule
Zensical design and staging contract | Fixed in this PR |
| `.github/CONTRIBUTING.md`, `README.md`, `AGENTS.md` | MSX repository
and community guidance | PSModule central policy ownership | Fixed in
this PR |
| `.github/release.yml` | MSX repository configuration |
Process-PSModule release ownership | Fixed in this PR |

</details>

<details>
<summary>Relevant issues (or links)</summary>

- Resolves #52
- Resolves #54
- Resolves #55

### Related work

- References PSModule/Process-PSModule#519
- References PSModule/Process-PSModule#438
- Followed by PSModule/Process-PSModule#523
- Followed by #56
- References MSXOrg/docs#190
- References #42
- References #49
- References #50
- References #51

</details>

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
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.

1 participant