Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ customize rule selection, severity filtering, and custom rule inclusion.
| `SettingsFilePath` | The path to the settings file. | false | `.github/linters/.powershell-psscriptanalyzer.psd1` |
| `Debug` | Enable debug output. | false | `'false'` |
| `Verbose` | Enable verbose output. | false | `'false'` |
| `Version` | Specifies the exact version of the GitHub module to install. | false | |
| `Prerelease` | Allow prerelease versions if available. | false | `'false'` |
| `PesterVersion` | Specifies the version of the Pester module to install (NuGet range). | false | |
| `PesterPrerelease` | Allow prerelease versions of the Pester module if available. | false | `'false'` |
| `GitHubVersion` | Specifies the version of the GitHub module to install (NuGet range). | false | |
| `GitHubPrerelease` | Allow prerelease versions of the GitHub module if available. | false | `'false'` |
| `WorkingDirectory` | The working directory where the script runs. | false | `'.'` |
| `ReportAsJson` | Output generated reports in JSON format in addition to the configured format. | false | `'true'` |
| `Notice_Mode` | Controls when to show notices for test completion. | false | `'Failed'` |
Expand Down
31 changes: 22 additions & 9 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,22 @@ inputs:
description: Enable verbose output.
required: false
default: 'false'
Version:
description: Specifies the version of the GitHub module to be installed. The value must be an exact version.
PesterVersion:
description: |
Specifies the version of the Pester module to install, using NuGet version-range syntax (for example '[6.0.0,7.0.0)').
When empty, the latest available version is installed.
required: false
PesterPrerelease:
description: Allow prerelease versions of the Pester module if available.
required: false
default: 'false'
GitHubVersion:
description: |
Specifies the version of the GitHub module to install, using NuGet version-range syntax (for example '[1.2.0, 2.0.0)').
When empty, the latest available version is installed.
required: false
Prerelease:
description: Allow prerelease versions if available.
GitHubPrerelease:
description: Allow prerelease versions of the GitHub module if available.
required: false
default: 'false'
WorkingDirectory:
Expand Down Expand Up @@ -255,22 +266,24 @@ runs:
PSMODULE_INVOKE_SCRIPTANALYZER_INPUT_SettingsFilePath: ${{ inputs.SettingsFilePath }}
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
Prerelease: ${{ inputs.GitHubPrerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Version: ${{ inputs.GitHubVersion }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
Script: ${{ github.action_path }}/src/main.ps1

- name: Invoke-Pester
uses: PSModule/Invoke-Pester@abddf7bef0d0614d7ca322036af6a06ee0fb4d44 # v4.2.4
uses: PSModule/Invoke-Pester@4ff33199141fdf22568990b6107fe3148ae93a1c # v5.1.0
id: test
env:
SettingsFilePath: ${{ fromJson(steps.paths.outputs.result).SettingsFilePath }}
with:
Debug: ${{ inputs.Debug }}
Prerelease: ${{ inputs.Prerelease }}
GitHubPrerelease: ${{ inputs.GitHubPrerelease }}
GitHubVersion: ${{ inputs.GitHubVersion }}
Prerelease: ${{ inputs.PesterPrerelease }}
Verbose: ${{ inputs.Verbose }}
Version: ${{ inputs.Version }}
Version: ${{ inputs.PesterVersion }}
WorkingDirectory: ${{ inputs.WorkingDirectory }}
TestResult_TestSuiteName: ${{ inputs.TestResult_TestSuiteName }}
Path: ${{ github.action_path }}/src/tests/PSScriptAnalyzer
Expand Down
Loading