Releases: PSModule/Test-PSModule
Release list
v3.0.13
🪲 [Fix]: Built modules with resolved versions can be tested (#119)
Built modules whose manifests carry a real, resolved version can now be tested by Test-PSModule. Previously the action installed the built module under the historical 999.0.0 placeholder folder, so module tests failed once the build flow started stamping manifests with the version that will actually be shipped.
Fixed: Built modules with resolved versions can be tested
Test-PSModule now installs and validates built module outputs whose manifest ModuleVersion has already been resolved to the real build version. The module is installed under a matching version folder before module tests run, so PowerShell accepts the manifest and Pester validates the artifact from the expected path.
This is delivered by bumping the pinned PSModule/Install-PSModuleHelpers to v1.0.8, which installs built modules at their real version instead of the 999.0.0 placeholder.
Technical Details
action.yml:PSModule/Install-PSModuleHelperspin bumpedv1.0.7->v1.0.8(the release from PSModule/Install-PSModuleHelpers#19).src/tests/Module/PSModule/PSModule.Tests.ps1: new test asserting the installed version folder matches the manifestModuleVersion, guarding against a regression to the999.0.0behavior.tests/outputTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1: fixtureModuleVersionupdated999.0.0->3.0.11to model the current build output.- The branch is merged up to date with
main, which already carries theactions/checkoutv7.0.0,super-linterv8.7.0, andPSModule/Invoke-Pesterv4.2.6 pins, so this PR no longer changes those.
v3.0.12
Bump PSModule/Invoke-Pester from 4.2.4 to 4.2.6 (#121)
Bumps PSModule/Invoke-Pester from v4.2.4 to v4.2.6 (latest).
Supersedes #115, which only bumped to v4.2.5 — going straight to the latest avoids chaining two dependency PRs.
What this PR changes
A single pin in action.yml:
uses: PSModule/Invoke-Pester@9cf262a79e7528d5af41c875c35dae91c44d18dd # v4.2.6
Upstream changes inside Invoke-Pester between v4.2.4 and v4.2.6 are captured in its own release notes. Those (e.g. its internal upload-artifact / GitHub-Script bumps) are internal to the Invoke-Pester action, not separate dependencies of this repo.
Status of all pinned actions in this repo
| Action | Pinned | Latest | Status |
|---|---|---|---|
actions/checkout |
v7.0.0 | v7.0.0 | up to date |
super-linter/super-linter |
v8.7.0 | v8.7.0 | up to date |
PSModule/Release-GHRepository |
v2.0.2 | v2.0.2 | up to date |
PSModule/Invoke-Pester |
v4.2.6 | v4.2.6 | this PR |
PSModule/Install-PSModuleHelpers |
v1.0.7 | v1.0.8 | handled by #119 |
v3.0.11
🪲 [Fix]: Type-accelerator tests handle modules without enums or classes (#120)
Module test runs now handle modules that export only one kind of public type under Pester 6. Type-accelerator checks skip empty enum or class collections instead of failing discovery, so Test-PSModule can validate modules that have classes without enums, enums without classes, or both.
Fixed: Type-accelerator tests handle missing enum or class exports
Modules no longer fail the Test-PSModule module test suite just because one type category is empty. If a module has public classes but no public enums, the enum registration check is skipped and the class registration checks still run. If a module has public enums but no public classes, the class registration check is skipped and the enum registration checks still run.
This resolves the Pester 6 discovery failure caused by empty -ForEach collections while preserving coverage for the exported types that do exist.
Technical Details
src/tests/Module/PSModule/PSModule.Tests.ps1now passes-AllowNullOrEmptyForEachto both type-acceleratorItblocks..github/workflows/Action-Test-outputs.ymlnow runs the output fixture workflow against both the existing class-only fixture and a new enum-only fixture.tests/outputEnumOnlyTestRepo/outputs/module/PSModuleEnumOnlyadds a minimal enum-only module fixture for the missing coverage path.- The enum-only fixture cleanup only removes accelerators that still point to the type exported by that fixture, avoiding removal of pre-existing accelerators with the same name.
v3.0.10
🩹 [Patch]: Framework-generated boilerplate code now tested and covered (#113)
Module tests now validate framework-injected boilerplate — type accelerator registration and OnRemove cleanup — so code coverage reflects actual test gaps instead of penalizing module authors for untested framework code.
New: Type accelerator registration tests
When Build-PSModule injects a class exporter region, the module tests now verify that every public class and enum listed in $ExportableClasses / $ExportableEnums is registered as a type accelerator after import.
Context Framework - Type accelerator registration
[+] Should register public class [Book] as a type accelerator
[+] Should register public class [BookList] as a type accelerator
Modules without a class exporter region skip these tests automatically.
New: OnRemove cleanup tests
A new test verifies that when the module is removed, its type accelerators are cleaned up via the OnRemove hook — preventing type collisions when re-importing or importing a different version.
Context Framework - Module OnRemove cleanup
[+] Should clean up type accelerators when the module is removed
Changed: IsWindows compatibility shim removed
The $IsWindows = $true PS 5.1 Desktop edition shim has been removed from Build-PSModule (see PSModule/Build-PSModule#132). The corresponding test context and test fixture output have been removed here as well. PSModule targets PowerShell LTS (7.6+) where $IsWindows is a built-in automatic variable.
Technical Details
PSModule.Tests.ps1: Discovery-phase variables ($hasClassExporter,$expectedClassNames,$expectedEnumNames) are computed at script scope for Pester's-Skip/-ForEachevaluation, then recomputed in a top-levelBeforeAllfor the Run phase. This dual-computation pattern is required because Pester v5 Discovery and Run are separate executions that don't share script-scope state.PSModuleTest.psm1(test fixture): Updated to remove the$IsWindowsshim and its suppression attributes, matching the new Build-PSModule output format.- PSScriptAnalyzer
PSUseDeclaredVarsMoreThanAssignmentssuppressed at file level because the analyzer cannot trace variable flow across Pester'sBeforeAll→Itblock boundaries.
v3.0.9
Bump PSModule/Invoke-Pester from 4.2.3 to 4.2.4 (#112)
Bumps PSModule/Invoke-Pester from 4.2.3 to 4.2.4.
Release notes
Sourced from PSModule/Invoke-Pester's releases.
v4.2.4
Bump actions/upload-artifact from 6.0.0 to 7.0.0 (#61)
Bumps actions/upload-artifact from 6.0.0 to 7.0.0.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase.
... (truncated)
Commits
abddf7bBump actions/upload-artifact from 6.0.0 to 7.0.0 (#61)3cdb795⚙️ [Maintenance]: Add afterall to codespell ignore words list (#60)ba25d5aBump super-linter/super-linter from 8.4.0 to 8.5.0 (#59)d1e3cbf⚙️ [Maintenance]: Update super-linter to v8.4.0 (#58)e4cb409⚙️ [Maintenance]: Align workflows across action repositories (#57)- See full diff in compare view
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
@dependabot rebasewill rebase this PR@dependabot recreatewill recreate this PR, overwriting any edits that have been made to it@dependabot show <dependency name> ignore conditionswill show all of the ignore conditions of the specified dependency@dependabot ignore this major versionwill close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this minor versionwill close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)@dependabot ignore this dependencywill close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
v3.0.8
🩹[Patch]: Workflow improvements (#106)
This release makes several updates to the project's GitHub workflows and configuration files, focusing on improving reliability, security, and maintainability. Key changes include pinning GitHub Action dependencies to specific commit hashes, updating workflow schedules and cooldowns, removing or replacing configuration files for release and linters, and updating references to scripts and modules for better consistency.
GitHub Actions and Workflow Improvements:
- All workflows now pin the
actions/checkoutand other GitHub Actions to specific commit SHAs for improved security and reproducibility, and setpersist-credentials: falseto enhance security. - Updated the linter workflow to use a specific version of
super-linter, and disabled certain validations for improved performance and compatibility.
Release Process Updates:
- Removed the old
Auto-Release.ymlworkflow and replaced it with a newRelease.ymlworkflow that uses a different release action and is triggered on pull requests affecting release-relevant files. - Deleted the
.github/release.ymlconfiguration for auto-generated release notes, centralizing release configuration in the workflow.
Configuration and Scheduling Changes:
- Changed the Dependabot update schedule from weekly to daily, and introduced a 7-day cooldown to avoid excessive update PRs.
- Removed the
.github/linters/.jscpd.jsonconfiguration file, likely because duplicate code detection is now disabled or managed elsewhere.
Script and Module Reference Updates:
- Updated references in
action.ymlto use specific commit SHAs for external modules and changed script paths fromscripts/main.ps1tosrc/main.ps1for consistency.
v3.0.7
Bump actions/checkout from 5 to 6 (#105)
Bumps actions/checkout from 5 to 6.
Release notes
Sourced from actions/checkout's releases.
v6.0.0
What's Changed
- Update README to include Node.js 24 support details and requirements by
@salmanmkcin actions/checkout#2248- Persist creds to a separate file by
@ericsciplein actions/checkout#2286- v6-beta by
@ericsciplein actions/checkout#2298- update readme/changelog for v6 by
@ericsciplein actions/checkout#2311Full Changelog: actions/checkout@v5.0.0...v6.0.0
v6-beta
What's Changed
Updated persist-credentials to store the credentials under
$RUNNER_TEMPinstead of directly in the local git config.This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.
v5.0.1
What's Changed
- Port v6 cleanup to v5 by
@ericsciplein actions/checkout#2301Full Changelog: actions/checkout@v5...v5.0.1
Changelog
Sourced from actions/checkout's changelog.
Changelog
V6.0.0
- Persist creds to a separate file by
@ericsciplein actions/checkout#2286- Update README to include Node.js 24 support details and requirements by
@salmanmkcin actions/checkout#2248V5.0.1
- Port v6 cleanup to v5 by
@ericsciplein actions/checkout#2301V5.0.0
- Update actions checkout to use node 24 by
@salmanmkcin actions/checkout#2226V4.3.1
- Port v6 cleanup to v4 by
@ericsciplein actions/checkout#2305V4.3.0
- docs: update README.md by
@motssin actions/checkout#1971- Add internal repos for checking out multiple repositories by
@mouismailin actions/checkout#1977- Documentation update - add recommended permissions to Readme by
@benwellsin actions/checkout#2043- Adjust positioning of user email note and permissions heading by
@joshmgrossin actions/checkout#2044- Update README.md by
@nebuk89in actions/checkout#2194- Update CODEOWNERS for actions by
@TingluoHuangin actions/checkout#2224- Update package dependencies by
@salmanmkcin actions/checkout#2236v4.2.2
url-helper.tsnow leverages well-known environment variables by@jww3in actions/checkout#1941- Expand unit test coverage for
isGhesby@jww3in actions/checkout#1946v4.2.1
- Check out other refs/* by commit if provided, fall back to ref by
@orhantoyin actions/checkout#1924v4.2.0
- Add Ref and Commit outputs by
@lucacomein actions/checkout#1180- Dependency updates by
@dependabot- actions/checkout#1777, actions/checkout#1872v4.1.7
- Bump the minor-npm-dependencies group across 1 directory with 4 updates by
@dependabotin actions/checkout#1739- Bump actions/checkout from 3 to 4 by
@dependabotin actions/checkout#1697- Check out other refs/* by commit by
@orhantoyin actions/checkout#1774- Pin actions/checkout's own workflows to a known, good, stable version. by
@jww3in actions/checkout#1776v4.1.6
- Check platform to set archive extension appropriately by
@cory-millerin actions/checkout#1732v4.1.5
- Update NPM dependencies by
@cory-millerin actions/checkout#1703- Bump github/codeql-action from 2 to 3 by
@dependabotin actions/checkout#1694- Bump actions/setup-node from 1 to 4 by
@dependabotin actions/checkout#1696- Bump actions/upload-artifact from 2 to 4 by
@dependabotin actions/checkout#1695
... (truncated)
Commits
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-...
v3.0.6
🩹 [Patch]: Move documentation and link to Process-PSModule (#104)
Description
This pull request primarily cleans up and simplifies the documentation and metadata for the Test-PSModule GitHub Action. The most significant changes are the removal of detailed usage instructions and specifications from the README.md, and a simplification of the action's metadata in action.yml.
Documentation and metadata simplification:
- The
README.mdfile has been drastically reduced, removing all detailed setup instructions, usage explanations, input/output tables, and specification details, leaving only a single-line description and a link to the PSModule framework. - The
action.ymlfile has been simplified by removing the branding section and slightly adjusting the action name, making the metadata more concise.
v3.0.5
🩹 [Patch]: Encode all PowerShell files using UTF8 with BOM (#103)
Description
This pull request introduces a minor change to the Planets.ps1 files in two test repositories. The only modification is the addition of a Unicode Byte Order Mark (BOM) at the beginning of each file, which does not affect script functionality but may impact how some editors interpret file encoding.
- Added a BOM to the start of
tests/srcTestRepo/src/variables/public/Planets.ps1 - Added a BOM to the start of
tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1
v3.0.4
🩹 [Patch]: Update Dependabot configuration to include labels for GitHub Actions (#102)
Description
This pull request makes a small configuration update to the Dependabot settings. It adds default labels to pull requests created for GitHub Actions dependencies, making them easier to identify and filter.
- Added the
dependenciesandgithub-actionslabels to Dependabot PRs for GitHub Actions in.github/dependabot.yml.