Skip to content

Commit 281e325

Browse files
🩹 [Patch]: Add Notice_Mode input to control test completion notifications
1 parent 3e28297 commit 281e325

File tree

2 files changed

+54
-47
lines changed

2 files changed

+54
-47
lines changed

‎README.md‎

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -15,53 +15,54 @@ customize rule selection, severity filtering, and custom rule inclusion.
1515

1616
## Inputs
1717

18-
| Input | Description | Required | Default |
19-
|--------------------------------------|--------------------------------------------------------------------------------|----------|-----------------------------------------------------------------------------|
20-
| `Path` | The path to the code to test. | false | `'.'` |
21-
| `SettingsFilePath` | The path to the settings file. | false | `.github/linters/.powershell-psscriptanalyzer.psd1` |
22-
| `Debug` | Enable debug output. | false | `'false'` |
23-
| `Verbose` | Enable verbose output. | false | `'false'` |
24-
| `Version` | Specifies the exact version of the GitHub module to install. | false | |
25-
| `Prerelease` | Allow prerelease versions if available. | false | `'false'` |
26-
| `WorkingDirectory` | The working directory where the script runs. | false | `'.'` |
27-
| `ReportAsJson` | Output generated reports in JSON format in addition to the configured format. | false | `'true'` |
28-
| `StepSummary_Enabled` | Controls if a GitHub step summary should be shown. | false | `'true'` |
29-
| `StepSummary_ShowTestOverview` | Controls whether to show the test overview table in the GitHub step summary. | false | `'true'` |
30-
| `StepSummary_ShowTests` | Controls which tests to show in the GitHub step summary (Full/Failed/None). | false | `'Failed'` |
31-
| `StepSummary_ShowConfiguration` | Controls whether to show the configuration details in the GitHub step summary. | false | `'false'` |
32-
| `Run_ExcludePath` | Directories or files to be excluded from the run. | false | |
33-
| `Run_Exit` | Exit with non-zero exit code when the test run fails. | false | |
34-
| `Run_Throw` | Throw an exception when test run fails. | false | |
35-
| `Run_SkipRun` | Runs the discovery phase but skips run. | false | |
36-
| `Run_SkipRemainingOnFailure` | Skips remaining tests after failure (None/Run/Container/Block). | false | |
37-
| `CodeCoverage_Enabled` | Enable CodeCoverage. | false | |
38-
| `CodeCoverage_OutputFormat` | Format to use for code coverage report (JaCoCo/CoverageGutters/Cobertura). | false | |
39-
| `CodeCoverage_OutputPath` | Path relative to the current directory where code coverage report is saved. | false | |
40-
| `CodeCoverage_OutputEncoding` | Encoding of the output file. | false | |
41-
| `CodeCoverage_Path` | Directories or files to be used for code coverage. | false | |
42-
| `CodeCoverage_ExcludeTests` | Exclude tests from code coverage. | false | |
43-
| `CodeCoverage_RecursePaths` | Will recurse through directories in the Path option. | false | |
44-
| `CodeCoverage_CoveragePercentTarget` | Target percent of code coverage that you want to achieve. | false | |
45-
| `CodeCoverage_UseBreakpoints` | EXPERIMENTAL: Use Profiler based tracer instead of breakpoints when false. | false | |
46-
| `CodeCoverage_SingleHitBreakpoints` | Remove breakpoint when it is hit. | false | |
47-
| `TestResult_Enabled` | Enable TestResult. | false | |
48-
| `TestResult_OutputFormat` | Format to use for test result report (NUnitXml/NUnit2.5/NUnit3/JUnitXml). | false | |
49-
| `TestResult_OutputPath` | Path relative to the current directory where test result report is saved. | false | |
50-
| `TestResult_OutputEncoding` | Encoding of the output file. | false | |
51-
| `TestResult_TestSuiteName` | Set the name assigned to the root 'test-suite' element. | false | `PSScriptAnalyzer` |
52-
| `Should_ErrorAction` | Controls if Should throws on error. Use 'Stop' or 'Continue'. | false | |
53-
| `Debug_ShowFullErrors` | Show full errors including Pester internal stack. | false | |
54-
| `Debug_WriteDebugMessages` | Write Debug messages to screen. | false | |
55-
| `Debug_WriteDebugMessagesFrom` | Write Debug messages from a given source. | false | |
56-
| `Debug_ShowNavigationMarkers` | Write paths after every block and test, for easy navigation. | false | |
57-
| `Debug_ReturnRawResultObject` | Returns unfiltered result object, for development only. | false | |
58-
| `Output_Verbosity` | The verbosity of output (None/Normal/Detailed/Diagnostic). | false | |
59-
| `Output_StackTraceVerbosity` | The verbosity of stacktrace output (None/FirstLine/Filtered/Full). | false | |
60-
| `Output_CIFormat` | The CI format of error output (None/Auto/AzureDevops/GithubActions). | false | |
61-
| `Output_CILogLevel` | The CI log level in build logs (Error/Warning). | false | |
62-
| `Output_RenderMode` | The mode used to render console output (Auto/Ansi/ConsoleColor/Plaintext). | false | |
63-
| `TestDrive_Enabled` | Enable TestDrive. | false | |
64-
| `TestRegistry_Enabled` | Enable TestRegistry. | false | |
18+
| Input | Description | Required | Default |
19+
|--------------------------------------|--------------------------------------------------------------------------------|----------|-----------------------------------------------------|
20+
| `Path` | The path to the code to test. | false | `'.'` |
21+
| `SettingsFilePath` | The path to the settings file. | false | `.github/linters/.powershell-psscriptanalyzer.psd1` |
22+
| `Debug` | Enable debug output. | false | `'false'` |
23+
| `Verbose` | Enable verbose output. | false | `'false'` |
24+
| `Version` | Specifies the exact version of the GitHub module to install. | false | |
25+
| `Prerelease` | Allow prerelease versions if available. | false | `'false'` |
26+
| `WorkingDirectory` | The working directory where the script runs. | false | `'.'` |
27+
| `ReportAsJson` | Output generated reports in JSON format in addition to the configured format. | false | `'true'` |
28+
| `Notice_Mode` | Controls when to show notices for test completion. | false | `'Failed'` |
29+
| `StepSummary_Enabled` | Controls if a GitHub step summary should be shown. | false | `'true'` |
30+
| `StepSummary_ShowTestOverview` | Controls whether to show the test overview table in the GitHub step summary. | false | `'true'` |
31+
| `StepSummary_ShowTests` | Controls which tests to show in the GitHub step summary (Full/Failed/None). | false | `'Failed'` |
32+
| `StepSummary_ShowConfiguration` | Controls whether to show the configuration details in the GitHub step summary. | false | `'false'` |
33+
| `Run_ExcludePath` | Directories or files to be excluded from the run. | false | |
34+
| `Run_Exit` | Exit with non-zero exit code when the test run fails. | false | |
35+
| `Run_Throw` | Throw an exception when test run fails. | false | |
36+
| `Run_SkipRun` | Runs the discovery phase but skips run. | false | |
37+
| `Run_SkipRemainingOnFailure` | Skips remaining tests after failure (None/Run/Container/Block). | false | |
38+
| `CodeCoverage_Enabled` | Enable CodeCoverage. | false | |
39+
| `CodeCoverage_OutputFormat` | Format to use for code coverage report (JaCoCo/CoverageGutters/Cobertura). | false | |
40+
| `CodeCoverage_OutputPath` | Path relative to the current directory where code coverage report is saved. | false | |
41+
| `CodeCoverage_OutputEncoding` | Encoding of the output file. | false | |
42+
| `CodeCoverage_Path` | Directories or files to be used for code coverage. | false | |
43+
| `CodeCoverage_ExcludeTests` | Exclude tests from code coverage. | false | |
44+
| `CodeCoverage_RecursePaths` | Will recurse through directories in the Path option. | false | |
45+
| `CodeCoverage_CoveragePercentTarget` | Target percent of code coverage that you want to achieve. | false | |
46+
| `CodeCoverage_UseBreakpoints` | EXPERIMENTAL: Use Profiler based tracer instead of breakpoints when false. | false | |
47+
| `CodeCoverage_SingleHitBreakpoints` | Remove breakpoint when it is hit. | false | |
48+
| `TestResult_Enabled` | Enable TestResult. | false | |
49+
| `TestResult_OutputFormat` | Format to use for test result report (NUnitXml/NUnit2.5/NUnit3/JUnitXml). | false | |
50+
| `TestResult_OutputPath` | Path relative to the current directory where test result report is saved. | false | |
51+
| `TestResult_OutputEncoding` | Encoding of the output file. | false | |
52+
| `TestResult_TestSuiteName` | Set the name assigned to the root 'test-suite' element. | false | `PSScriptAnalyzer` |
53+
| `Should_ErrorAction` | Controls if Should throws on error. Use 'Stop' or 'Continue'. | false | |
54+
| `Debug_ShowFullErrors` | Show full errors including Pester internal stack. | false | |
55+
| `Debug_WriteDebugMessages` | Write Debug messages to screen. | false | |
56+
| `Debug_WriteDebugMessagesFrom` | Write Debug messages from a given source. | false | |
57+
| `Debug_ShowNavigationMarkers` | Write paths after every block and test, for easy navigation. | false | |
58+
| `Debug_ReturnRawResultObject` | Returns unfiltered result object, for development only. | false | |
59+
| `Output_Verbosity` | The verbosity of output (None/Normal/Detailed/Diagnostic). | false | |
60+
| `Output_StackTraceVerbosity` | The verbosity of stacktrace output (None/FirstLine/Filtered/Full). | false | |
61+
| `Output_CIFormat` | The CI format of error output (None/Auto/AzureDevops/GithubActions). | false | |
62+
| `Output_CILogLevel` | The CI log level in build logs (Error/Warning). | false | |
63+
| `Output_RenderMode` | The mode used to render console output (Auto/Ansi/ConsoleColor/Plaintext). | false | |
64+
| `TestDrive_Enabled` | Enable TestDrive. | false | |
65+
| `TestRegistry_Enabled` | Enable TestRegistry. | false | |
6566

6667
## Outputs
6768

‎action.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ inputs:
3737
Output generated reports in JSON format in addition to the configured format through Pester.
3838
required: false
3939
default: 'true'
40+
Notice_Mode:
41+
description: |
42+
Controls when to show notices for test completion. Allows "Full" (show on success and failure), "Failed" (show only on failure), or "None" (disable notices).
43+
required: false
44+
default: 'Failed'
4045
StepSummary_ShowTestOverview:
4146
description: |
4247
Controls whether to show the test overview table in the GitHub step summary.
@@ -271,6 +276,7 @@ runs:
271276
Path: ${{ github.action_path }}/scripts/tests/PSScriptAnalyzer
272277
Run_Path: ${{ fromJson(steps.paths.outputs.result).CodePath }}
273278
ReportAsJson: ${{ inputs.ReportAsJson }}
279+
Notice_Mode: ${{ inputs.Notice_Mode }}
274280
StepSummary_ShowTestOverview: ${{ inputs.StepSummary_ShowTestOverview }}
275281
StepSummary_Mode: ${{ inputs.StepSummary_Mode }}
276282
StepSummary_ShowConfiguration: ${{ inputs.StepSummary_ShowConfiguration }}

0 commit comments

Comments
 (0)