Skip to content

test-local: use the build's required modules on a clean checkout - #34

Merged
christaylorcodes merged 1 commit into
masterfrom
fix/release-clean-runner
Nov 11, 2026
Merged

christaylorcodes merged 1 commit into
masterfrom
fix/release-clean-runner

Conversation

@christaylorcodes

Copy link
Copy Markdown
Owner

Fixes the first dry run of the release workflow, which failed in the Docs stage with "The specified module 'platyPS' was not loaded" (run). Nothing was published; the publish and release jobs were skipped.

Cause

Tests/test-local.ps1 adds output/RequiredModules to PSModulePath once, at the start. On a clean checkout that folder does not exist yet: the Build stage creates it. So when every stage runs in one call on a clean machine, the later stages do not see the modules the build resolved.

  • CI never hit this, because each CI job installs its own tools.
  • A developer machine never hit it, because the folder is left over from an earlier build.
  • On the runner, Analyze and Test passed only because the image has PSScriptAnalyzer and Pester preinstalled, so they ran with the image's versions, not the pinned ones. platyPS is not on the image, so Docs failed.

Fix

test-local.ps1 adds the folder to the module path again right after the Build stage. The later stages now use the pinned versions from RequiredModules.psd1 on a clean checkout too.

Testing

  • Reproduced in a fresh clone with no output/ folder: -Stage Build, Analyze, Docs failed on platyPS before the change and passes after it.
  • ./Tests/test-local.ps1: all stages pass; 477 tests pass on PowerShell 7 and Windows PowerShell 5.1.
  • The release dry run will be started again after this merges.

🤖 Generated with Claude Code

output/RequiredModules was added to PSModulePath only at the start, before
the Build stage creates it. A one-call run on a clean machine (the release
workflow) then had no platyPS for the Docs stage.

Co-Authored-By: Claude <noreply@anthropic.com>
@christaylorcodes
christaylorcodes merged commit 95cb974 into master Nov 11, 2026
6 checks passed
@christaylorcodes
christaylorcodes deleted the fix/release-clean-runner branch November 12, 2026 21:45
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