From 37c5111b54fa60c467a357ee686dabedef347417 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sat, 7 Dec 2024 20:32:39 +0100 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Enable=20verbose?= =?UTF-8?q?=20and=20debug=20output=20preferences=20in=20action=20script?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- action.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/action.yml b/action.yml index 8aed10f3..222893db 100644 --- a/action.yml +++ b/action.yml @@ -51,6 +51,8 @@ runs: GITHUB_ACTION_INPUT_Verbosity: ${{ inputs.Verbosity }} run: | # Test-PSModule + $VerbosePreference = 'Continue' + $DebugPreference = 'Continue' $passed = . "${{ github.action_path }}\scripts\main.ps1" -Verbose "passed=$passed" | Out-File -FilePath $env:GITHUB_OUTPUT -Append From d0baff6343fb7ceb8d3254be1ec637bd1a3bc448 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 8 Dec 2024 00:18:20 +0100 Subject: [PATCH 2/2] Fixes --- README.md | 2 ++ action.yml | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3eb9fe2b..b6cc41ef 100644 --- a/README.md +++ b/README.md @@ -103,6 +103,8 @@ jobs: | `TestsPath` | The path to the tests to run. | `false` | `tests` | | `StackTraceVerbosity` | Verbosity level of the stack trace. Allowed values: `None`, `FirstLine`, `Filtered`, `Full`. | `false` | `Filtered` | | `Verbosity` | Verbosity level of the test output. Allowed values: `None`, `Normal`, `Detailed`, `Diagnostic`. | `false` | `Detailed` | +| `VerbosePreference` | The preference for verbose output. Allowed values: `SilentlyContinue`, `Stop`, `Continue`, `Inquire`, `Break`, `Ignore`, `Suspend`. | `false` | `SilentlyContinue` | +| `DebugPreference` | The preference for debug output. Allowed values: `SilentlyContinue`, `Stop`, `Continue`, `Inquire`, `Break`, `Ignore`, `Suspend`. | `false` | `SilentlyContinue` | ### Outputs diff --git a/action.yml b/action.yml index 222893db..a36f735e 100644 --- a/action.yml +++ b/action.yml @@ -27,6 +27,14 @@ inputs: description: "Verbosity level of the test output. Allowed values: 'None', 'Normal', 'Detailed', 'Diagnostic'." required: false default: 'Detailed' + VerbosePreference: + description: "The preference for verbose output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'." + required: false + default: 'SilentlyContinue' + DebugPreference: + description: "The preference for debug output. Allowed values: 'SilentlyContinue', 'Stop', 'Continue', 'Inquire', 'Break', 'Ignore','Suspend'." + required: false + default: 'SilentlyContinue' outputs: passed: @@ -49,10 +57,12 @@ runs: GITHUB_ACTION_INPUT_TestsPath: ${{ inputs.TestsPath }} GITHUB_ACTION_INPUT_StackTraceVerbosity: ${{ inputs.StackTraceVerbosity }} GITHUB_ACTION_INPUT_Verbosity: ${{ inputs.Verbosity }} + GITHUB_ACTION_INPUT_VerbosePreference: ${{ inputs.VerbosePreference }} + GITHUB_ACTION_INPUT_DebugPreference: ${{ inputs.DebugPreference }} run: | # Test-PSModule - $VerbosePreference = 'Continue' - $DebugPreference = 'Continue' + $VerbosePreference = $env:GITHUB_ACTION_INPUT_VerbosePreference + $DebugPreference = $env:GITHUB_ACTION_INPUT_DebugPreference $passed = . "${{ github.action_path }}\scripts\main.ps1" -Verbose "passed=$passed" | Out-File -FilePath $env:GITHUB_OUTPUT -Append