You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(#260): enforce supported Pester version range and improve error handling
- `Invoke-NovaTest`, `Test-NovaBuild`, and `% nova test` now only use Pester versions from `5.7.1` to `5.10.0`, failing with a clear error for unsupported `Pester 6.x`.
- Updated documentation to reflect the new Pester version requirements.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
15
15
16
16
### Fixed
17
17
18
+
-`Invoke-NovaTest`, `Test-NovaBuild`, and `% nova test` now resolve and import a supported installed `Pester` version from `5.7.1` through `5.10.0` instead of using an unsupported `Pester 6.x` installation automatically.
19
+
- Nova test workflows now fail early with a clear dependency error when only unsupported `Pester 6.x` versions are available.
Copy file name to clipboardExpand all lines: README.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -298,8 +298,9 @@ Notes:
298
298
- if `project.json` sets `Pester.CodeCoverage.CoveragePercentTarget`, `Invoke-NovaTest` fails when the measured coverage percentage is lower than that configured target
299
299
- this repository currently enables coverage with a `99` percent target; the template and packaged example
300
300
`project.json` files ship the same JaCoCo configuration shape with `Enabled=false` and a `90` percent opt-in target
301
-
- make sure `Pester 5.7.1` is available before running `Invoke-NovaTest` or `Test-NovaBuild`
302
-
- the published `NovaModuleTools` manifest also declares `Pester 5.7.1`, so installed end-user workflows can still resolve that dependency automatically
301
+
- make sure a supported `Pester` version from `5.7.1` through `5.10.0` is available before running `Invoke-NovaTest` or `Test-NovaBuild`
302
+
- Nova resolves and imports a compatible installed `Pester 5.x` version for the managed test workflow and does not run tests with `Pester 6.x`
303
+
- the published `NovaModuleTools` manifest declares `Pester` with `ModuleVersion = 5.7.1` and `MaximumVersion = 5.10.0`, so installed end-user workflows can still resolve that supported dependency range automatically
303
304
304
305
### Create a package artifact
305
306
@@ -640,7 +641,7 @@ Responsibilities currently covered by the release pipeline include:
640
641
- publishing to PowerShell Gallery
641
642
- preparing the next prerelease version on `develop`
642
643
643
-
The workflow now uses `KeepAChangelog` for changelog release moves, creates annotated git tags named directly from the release version, and bootstraps the local PSResourceGet repository store before calling `Publish-NovaModule`. The shared CI installer also installs `Pester 5.7.1` explicitly before it installs prerelease gallery modules so test workflows do not rely on transitive manifest dependency resolution.
644
+
The workflow now uses `KeepAChangelog` for changelog release moves, creates annotated git tags named directly from the release version, and bootstraps the local PSResourceGet repository store before calling `Publish-NovaModule`. The shared CI installer also installs `Pester 5.7.1` explicitly before it installs prerelease gallery modules so test workflows stay on Nova's supported `Pester 5.x` range and do not rely on transitive manifest dependency resolution.
Copy file name to clipboardExpand all lines: RELEASE_NOTE.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ This file summarizes the release notes for NovaModuleTools. **UNRELEASED** chang
14
14
15
15
### Fixed
16
16
17
+
-`Invoke-NovaTest`, `Test-NovaBuild`, and `% nova test` now stay on Nova's supported `Pester 5.x` range and stop with a clear error instead of trying to run with an installed `Pester 6.x` version.
`Invoke-NovaTest` reads the Pester configuration from `project.json`, discovers the repository unit-test files, and runs the managed Nova test workflow without rebuilding the project first.
34
34
35
+
Nova resolves a supported installed `Pester` version from `5.7.1` through `5.10.0` for the managed test workflow and stops with a clear dependency error when only unsupported `Pester 6.x` versions are available.
36
+
35
37
The unit-test workflow writes NUnit XML to `artifacts/UnitTestResults.xml`.
36
38
37
39
When `Pester.CodeCoverage.Enabled` is `true`, Nova also writes JaCoCo coverage to `artifacts/coverage.xml` and fails the run when the measured percentage is lower than `Pester.CodeCoverage.CoveragePercentTarget`.
`Test-NovaBuild` reads the Pester configuration from `project.json`, discovers the build-validation integration tests for the current project, and runs the managed Nova test workflow against the built-module validation surface.
33
33
34
+
Nova resolves a supported installed `Pester` version from `5.7.1` through `5.10.0` for the managed test workflow and stops with a clear dependency error when only unsupported `Pester 6.x` versions are available.
35
+
34
36
This build-validation flow writes NUnit XML to `artifacts/TestResults.xml`.
35
37
36
38
Unlike `Invoke-NovaTest`, this command does not enforce source-coverage targets. Use `Invoke-NovaTest` for the unit-test and code-coverage workflow, and use `Test-NovaBuild` when you need build-validation integration coverage that reflects the built module path.
37
39
38
-
If the current project does not contain any `*.Integration.Tests.ps1` files, `Test-NovaBuild`stops with a Nova-native error that explains the expected naming and reminds you to use `Invoke-NovaTest` for unit tests.
40
+
If the current project does not contain any `*.Integration.Tests.ps1` files, `Test-NovaBuild`writes an actionable warning that explains the expected naming and reminds you to use `Invoke-NovaTest` for unit tests.
39
41
40
42
`-OverrideWarning` lets the nested build-validation flow continue even if the `src/public` layout guard reports zero or multiple top-level functions in a public file.
41
43
@@ -271,5 +273,5 @@ Returns the Pester result object from the managed build-validation run.
if (-not (Get-Module-Name Pester -ListAvailable)) {
19
-
Stop-NovaOperation-Message 'The module Pester must be installed to run Nova tests. Install Pester 5.7.1 and try again.'-ErrorId 'Nova.Dependency.PesterDependencyMissing'-Category ResourceUnavailable -TargetObject 'Pester'
if ($ModuleRequirement.MinimumVersion-eq$SupportedRequirement.MinimumVersion-and$ModuleRequirement.MaximumVersion-eq$SupportedRequirement.MaximumVersion) {
Stop-NovaOperation-Message "Nova tests support Pester only from $supportedVersionText. project.json declares Pester from $declaredVersionText. Update project.json to match Nova's supported range and try again."-ErrorId 'Nova.Dependency.UnsupportedPesterVersionRequirement'-Category InvalidData -TargetObject 'project.json'
return"The module Pester must be installed to run Nova tests. Install a supported Pester version from $supportedVersionText and try again."
170
+
}
171
+
172
+
return"Nova tests require Pester from $supportedVersionText. Installed versions: $($installedVersion-join', '). Install a supported Pester 5.x version and try again."
0 commit comments