psmodule/Test-PSModule
Test a PowerShell module before publishing the module to the PowerShell Gallery.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 11, 2026
- License
- MIT
Pinned Snippet
uses: psmodule/test-psmodule@902c5e50774e6606ccf41c125a1fe89f783c1149 # v3.0.14tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| Name | The name of the module to test. The name of the repository is used if not specified. | no | — |
| Settings | The type of tests to run. Can be either 'Module' or 'SourceCode'. | yes | — |
| StepSummary_Mode | Controls which tests to show in the GitHub step summary. Allows "Full" (show all tests), "Failed" (only failed tests), or "None" (disable step summary). | no | — |
| StepSummary_ShowTestOverview | Controls whether to show the test overview table in the GitHub step summary. | no | — |
| StepSummary_ShowConfiguration | Controls whether to show the configuration details in the GitHub step summary. | no | — |
| Run_Path | Directories to be searched for tests, paths directly to test files, or combination of both. | no | — |
| Run_ExcludePath | Directories or files to be excluded from the run. | no | — |
| Run_ScriptBlock | ScriptBlocks containing tests to be executed. | no | — |
| Run_Container | ContainerInfo objects containing tests to be executed. | no | — |
| Run_TestExtension | Filter used to identify test files. | no | — |
| Run_Exit | Exit with non-zero exit code when the test run fails. Exit code is always set to `$LASTEXITCODE` even when this option is `$false`. When used together with Throw, throwing an exception is preferred. | no | — |
| Run_Throw | Throw an exception when test run fails. When used together with Exit, throwing an exception is preferred. | no | — |
| Run_SkipRun | Runs the discovery phase but skips run. Use it with PassThru to get object populated with all tests. | no | — |
| Run_SkipRemainingOnFailure | Skips remaining tests after failure for selected scope, options are None, Run, Container and Block. | no | — |
| Filter_Tag | Tags of Describe, Context or It to be run. | no | — |
| Filter_ExcludeTag | Tags of Describe, Context or It to be excluded from the run. | no | — |
| Filter_Line | Filter by file and scriptblock start line, useful to run parsed tests programmatically to avoid problems with expanded names. Example: 'C:\tests\file1.Tests.ps1:37' | no | — |
| Filter_ExcludeLine | Exclude by file and scriptblock start line, takes precedence over Line. | no | — |
| Filter_FullName | Full name of test with -like wildcards, joined by dot. Example: '*.describe Get-Item.test1' | no | — |
| CodeCoverage_Enabled | Enable CodeCoverage. | no | — |
| CodeCoverage_OutputFormat | Format to use for code coverage report. Possible values: JaCoCo, CoverageGutters, Cobertura | no | — |
| CodeCoverage_OutputPath | Path relative to the current directory where code coverage report is saved. | no | — |
| CodeCoverage_OutputEncoding | Encoding of the output file. | no | — |
| CodeCoverage_Path | Directories or files to be used for code coverage, by default the Path(s) from general settings are used, unless overridden here. | no | — |
| CodeCoverage_ExcludeTests | Exclude tests from code coverage. This uses the TestFilter from general configuration. | no | — |
| CodeCoverage_RecursePaths | Will recurse through directories in the Path option. | no | — |
| CodeCoverage_CoveragePercentTarget | Target percent of code coverage that you want to achieve. | no | — |
| CodeCoverage_UseBreakpoints | EXPERIMENTAL: When false, use Profiler based tracer to do CodeCoverage instead of using breakpoints. | no | — |
| CodeCoverage_SingleHitBreakpoints | Remove breakpoint when it is hit. | no | — |
| TestResult_Enabled | Enable TestResult. | no | — |
| TestResult_OutputFormat | Format to use for test result report. Possible values: NUnitXml, NUnit2.5, NUnit3 or JUnitXml | no | — |
| TestResult_OutputPath | Path relative to the current directory where test result report is saved. | no | — |
| TestResult_OutputEncoding | Encoding of the output file. | no | — |
| TestResult_TestSuiteName | Set the name assigned to the root 'test-suite' element. | no | — |
| Should_ErrorAction | Controls if Should throws on error. Use 'Stop' to throw on error, or 'Continue' to fail at the end of the test. | no | — |
| Debug_ShowFullErrors | Show full errors including Pester internal stack. This property is deprecated, and if set to true it will override Output.StackTraceVerbosity to 'Full'. | no | — |
| Debug_WriteDebugMessages | Write Debug messages to screen. | no | — |
| Debug_WriteDebugMessagesFrom | Write Debug messages from a given source, WriteDebugMessages must be set to true for this to work. You can use like wildcards to get messages from multiple sources, as well as * to get everything. | no | — |
| Debug_ShowNavigationMarkers | Write paths after every block and test, for easy navigation in VSCode. | no | — |
| Debug_ReturnRawResultObject | Returns unfiltered result object, this is for development only. Do not rely on this object for additional properties, non-public properties will be renamed without previous notice. | no | — |
| Output_Verbosity | The verbosity of output, options are None, Normal, Detailed and Diagnostic. | no | — |
| Output_StackTraceVerbosity | The verbosity of stacktrace output, options are None, FirstLine, Filtered and Full. | no | — |
| Output_CIFormat | The CI format of error output in build logs, options are None, Auto, AzureDevops and GithubActions. | no | — |
| Output_CILogLevel | The CI log level in build logs, options are Error and Warning. | no | — |
| Output_RenderMode | The mode used to render console output, options are Auto, Ansi, ConsoleColor and Plaintext. | no | — |
| TestDrive_Enabled | Enable TestDrive. | no | — |
| TestRegistry_Enabled | Enable TestRegistry. | no | — |
| Debug | Enable debug output. | no | false |
| Verbose | Enable verbose output. | no | false |
| Version | Specifies the version of the GitHub module to be installed. The value must be an exact version. | no | — |
| Prerelease | Allow prerelease versions if available. | no | false |
| WorkingDirectory | The working directory to use for the action. This is the root folder where tests and outputs are expected. | no | . |
Outputs
| name | description |
|---|---|
| Outcome | The outcome of the test run. |
| Conclusion | The conclusion of the test run. |
| Executed | Whether tests were executed. |
| Result | Overall result of the Pester test run (e.g., Passed, Failed). |
| FailedCount | Number of failed tests. |
| FailedBlocksCount | Number of failed blocks. |
| FailedContainersCount | Number of failed containers. |
| PassedCount | Number of passed tests. |
| SkippedCount | Number of skipped tests. |
| InconclusiveCount | Number of inconclusive tests. |
| NotRunCount | Number of tests not run. |
| TotalCount | Total count of tests. |