Commit 25c9cd8
authored
🪲 [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](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.1 parent 5ad2353 commit 25c9cd8
3 files changed
Lines changed: 8 additions & 2 deletions
File tree
- src/tests/Module/PSModule
- tests/outputTestRepo/outputs/module/PSModuleTest
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
85 | 91 | | |
86 | 92 | | |
87 | 93 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
0 commit comments