Context and request
Observed behavior: Run_ScriptBlock is transported from the workflow as a string and copied directly into Run.ScriptBlock. Pester 5.8.0 and 6.1.0 convert that string to an empty ScriptBlock[], so the supplied tests are discarded.
Expected behavior: A script block supplied through Run_ScriptBlock is executed, or an unsupported representation fails with a clear validation error.
Reproduction:
- uses: PSModule/Invoke-Pester@v3
with:
Run_ScriptBlock: |
Describe 'inline tests' {
It 'runs' { $true | Should -BeTrue }
}
Environment: GitHub composite action with Pester 5.8.0 or 6.1.0.
Regression: Unknown. The declared action input appears not to have had a working scalar-to-script-block conversion.
Workaround: Put the test in a .Tests.ps1 file referenced by Path, or use a PowerShell configuration file containing a real script block.
Acceptance criteria
Technical decisions
The verified root cause is the scalar GitHub Action input crossing into a strongly typed Pester property without explicit conversion. Keep the correction limited to the action-input contract; configuration-file script blocks already retain their native type.
Implementation plan
- Add the failing action-level regression test.
- Define and validate the supported scalar representation.
- Convert it explicitly before merging the Pester configuration.
- Run the affected Pester 5 and Pester 6 action-test surfaces and update the input documentation.
Context and request
Observed behavior:
Run_ScriptBlockis transported from the workflow as a string and copied directly intoRun.ScriptBlock. Pester 5.8.0 and 6.1.0 convert that string to an emptyScriptBlock[], so the supplied tests are discarded.Expected behavior: A script block supplied through
Run_ScriptBlockis executed, or an unsupported representation fails with a clear validation error.Reproduction:
Environment: GitHub composite action with Pester 5.8.0 or 6.1.0.
Regression: Unknown. The declared action input appears not to have had a working scalar-to-script-block conversion.
Workaround: Put the test in a
.Tests.ps1file referenced byPath, or use a PowerShell configuration file containing a real script block.Acceptance criteria
ScriptBlockobjects before creating the Pester configuration.Run_ScriptBlocksyntax and validation errors.Technical decisions
The verified root cause is the scalar GitHub Action input crossing into a strongly typed Pester property without explicit conversion. Keep the correction limited to the action-input contract; configuration-file script blocks already retain their native type.
Implementation plan