Skip to content

Releases: PSModule/Test-PSModule

v3.0.13

Choose a tag to compare

@github-actions github-actions released this 08 Jul 15:41
25c9cd8

🪲 [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-PSModuleHelpers pin bumped v1.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 manifest ModuleVersion, guarding against a regression to the 999.0.0 behavior.
  • tests/outputTestRepo/outputs/module/PSModuleTest/PSModuleTest.psd1: fixture ModuleVersion updated 999.0.0 -> 3.0.11 to model the current build output.
  • The branch is merged up to date with main, which already carries the actions/checkout v7.0.0, super-linter v8.7.0, and PSModule/Invoke-Pester v4.2.6 pins, so this PR no longer changes those.

v3.0.12

Choose a tag to compare

@github-actions github-actions released this 08 Jul 15:08
5ad2353

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

Choose a tag to compare

@github-actions github-actions released this 08 Jul 09:47
033609e

🪲 [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.ps1 now passes -AllowNullOrEmptyForEach to both type-accelerator It blocks.
  • .github/workflows/Action-Test-outputs.yml now runs the output fixture workflow against both the existing class-only fixture and a new enum-only fixture.
  • tests/outputEnumOnlyTestRepo/outputs/module/PSModuleEnumOnly adds 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

Choose a tag to compare

@github-actions github-actions released this 05 Apr 16:32
8c33371

🩹 [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/-ForEach evaluation, then recomputed in a top-level BeforeAll for 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 $IsWindows shim and its suppression attributes, matching the new Build-PSModule output format.
  • PSScriptAnalyzer PSUseDeclaredVarsMoreThanAssignments suppressed at file level because the analyzer cannot trace variable flow across Pester's BeforeAllIt block boundaries.

v3.0.9

Choose a tag to compare

@github-actions github-actions released this 22 Mar 11:11
3cf6c58

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 compatibility score

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
  • abddf7b Bump actions/upload-artifact from 6.0.0 to 7.0.0 (#61)
  • 3cdb795 ⚙️ [Maintenance]: Add afterall to codespell ignore words list (#60)
  • ba25d5a Bump 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 compatibility score

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 rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will 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 version will 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 dependency will 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

Choose a tag to compare

@github-actions github-actions released this 27 Jan 19:00
d4d6d1d

🩹[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/checkout and other GitHub Actions to specific commit SHAs for improved security and reproducibility, and set persist-credentials: false to 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.yml workflow and replaced it with a new Release.yml workflow that uses a different release action and is triggered on pull requests affecting release-relevant files.
  • Deleted the .github/release.yml configuration 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.json configuration file, likely because duplicate code detection is now disabled or managed elsewhere.

Script and Module Reference Updates:

  • Updated references in action.yml to use specific commit SHAs for external modules and changed script paths from scripts/main.ps1 to src/main.ps1 for consistency.

v3.0.7

Choose a tag to compare

@github-actions github-actions released this 26 Nov 21:11
7d94ed7

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

Full Changelog: actions/checkout@v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead 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

Full Changelog: actions/checkout@v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[Dependabot compatibility score](https://docs.github.com/en/github/managing-security-vulnerabilities/about-...

Read more

v3.0.6

Choose a tag to compare

@github-actions github-actions released this 15 Oct 11:21
80b0364

🩹 [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.md file 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.yml file has been simplified by removing the branding section and slightly adjusting the action name, making the metadata more concise.

v3.0.5

Choose a tag to compare

@github-actions github-actions released this 12 Oct 12:30
a4ca518

🩹 [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

Choose a tag to compare

@github-actions github-actions released this 05 Oct 10:25
b6fbfe5

🩹 [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 dependencies and github-actions labels to Dependabot PRs for GitHub Actions in .github/dependabot.yml.