From c568915d0145c6cd67ef663f2cb07988c30f8007 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Fri, 25 Apr 2025 16:11:14 +0200 Subject: [PATCH 1/6] =?UTF-8?q?=F0=9F=AA=B2=20[Fix]:=20Remove=20unnecessar?= =?UTF-8?q?y=20LogGroup=20wrappers=20in=20tests=20(#100)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This pull request simplifies the `PSModule.Tests.ps1` script by removing unnecessary logging groups within the test cases which would autoload GitHub and its dependencies, breaking on tests for its dependencies (Sodium, Uri, CaseStyle, etc.). Simplification of test cases: * Removed `LogGroup` blocks from the `Module Manifest exists` and `Module Manifest is valid` tests. ## Type of change - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ] ⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas --- scripts/tests/Module/PSModule/PSModule.Tests.ps1 | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 index f355e72..e208dff 100644 --- a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 @@ -27,18 +27,14 @@ Describe 'PSModule - Module tests' { Context 'Module Manifest' { It 'Module Manifest exists' { - LogGroup 'Module manifest' { - $result = Test-Path -Path $moduleManifestPath - $result | Should -Be $true - Write-Host "$($result | Format-List | Out-String)" - } + $result = Test-Path -Path $moduleManifestPath + $result | Should -Be $true + Write-Host "$($result | Format-List | Out-String)" } It 'Module Manifest is valid' { - LogGroup 'Validating Module Manifest' { - $result = Test-ModuleManifest -Path $moduleManifestPath - $result | Should -Not -Be $null - Write-Host "$($result | Format-List | Out-String)" - } + $result = Test-ModuleManifest -Path $moduleManifestPath + $result | Should -Not -Be $null + Write-Host "$($result | Format-List | Out-String)" } # It 'has a valid license URL' {} # It 'has a valid project URL' {} From 962d8e94dd0549ce43e92192daaea8577f135d51 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 09:26:18 +0200 Subject: [PATCH 2/6] Bump actions/checkout from 4 to 5 (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
Release notes

Sourced from actions/checkout's releases.

v5.0.0

What's Changed

⚠️ Minimum Compatible Runner Version

v2.327.1
Release Notes

Make sure your runner is updated to this version or newer to use this release.

Full Changelog: https://github.com/actions/checkout/compare/v4...v5.0.0

v4.3.0

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4...v4.3.0

v4.2.2

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v4.2.1...v4.2.2

v4.2.1

What's Changed

New Contributors

Full Changelog: https://github.com/actions/checkout/compare/v4.2.0...v4.2.1

... (truncated)

Changelog

Sourced from actions/checkout's changelog.

Changelog

V5.0.0

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

v4.1.4

v4.1.3

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Marius Storhaug --- .github/workflows/Action-Test-Src-Default.yml | 2 +- .../Action-Test-Src-WithManifest.yml | 2 +- .github/workflows/Action-Test-outputs.yml | 2 +- .github/workflows/Auto-Release.yml | 2 +- .github/workflows/Linter.yml | 2 +- .../tests/Module/PSModule/PSModule.Tests.ps1 | 2 +- .../SourceCode/PSModule/PSModule.Tests.ps1 | 21 +++++++++---------- .../tests/MyTests/PSModuleTest.Tests.ps1 | 2 +- .../srcTestRepo/tests/PSModuleTest.Tests.ps1 | 2 +- .../tests/MyTests/PSModuleTest.Tests.ps1 | 2 +- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/Action-Test-Src-Default.yml b/.github/workflows/Action-Test-Src-Default.yml index 5d3301b..286804f 100644 --- a/.github/workflows/Action-Test-Src-Default.yml +++ b/.github/workflows/Action-Test-Src-Default.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-Src-WithManifest.yml b/.github/workflows/Action-Test-Src-WithManifest.yml index 53dc398..a8e16df 100644 --- a/.github/workflows/Action-Test-Src-WithManifest.yml +++ b/.github/workflows/Action-Test-Src-WithManifest.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-outputs.yml b/.github/workflows/Action-Test-outputs.yml index b47e511..2e25ae1 100644 --- a/.github/workflows/Action-Test-outputs.yml +++ b/.github/workflows/Action-Test-outputs.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Action-Test uses: ./ diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 680da5c..50a5a41 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Auto-Release uses: PSModule/Auto-Release@v1 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 1f677cb..94f34b0 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 diff --git a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 index e208dff..8bf00f5 100644 --- a/scripts/tests/Module/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/Module/PSModule/PSModule.Tests.ps1 @@ -7,7 +7,7 @@ Justification = 'Log outputs to GitHub Actions logs.' )] [CmdLetBinding()] -Param( +param( [Parameter(Mandatory)] [string] $Path ) diff --git a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 index 001ca7f..ef2efcf 100644 --- a/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 +++ b/scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1 @@ -14,8 +14,12 @@ 'PSAvoidUsingWriteHost', '', Justification = 'Logging to Github Actions.' )] +[Diagnostics.CodeAnalysis.SuppressMessageAttribute( + 'PSAvoidLongLines', '', + Justification = 'Consistent formatting of ternary operator usage' +)] [CmdLetBinding()] -Param( +param( # The path to the 'src' folder of the repo. [Parameter(Mandatory)] [string] $Path, @@ -40,8 +44,7 @@ BeforeAll { } Write-Host '::endgroup::' $privateFunctionsPath = Join-Path -Path $functionsPath -ChildPath 'private' - $privateFunctionFiles = (Test-Path -Path $privateFunctionsPath) ? - (Get-ChildItem -Path $privateFunctionsPath -File -Filter '*.ps1' -Recurse) : $null + $privateFunctionFiles = (Test-Path -Path $privateFunctionsPath) ? (Get-ChildItem -Path $privateFunctionsPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateFunctionFiles.Count)]" $privateFunctionFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -62,16 +65,14 @@ BeforeAll { } Write-Host '::endgroup::' $privateVariablesPath = Join-Path -Path $variablesPath -ChildPath 'private' - $privateVariableFiles = (Test-Path -Path $privateVariablesPath) ? - (Get-ChildItem -Path $privateVariablesPath -File -Filter '*.ps1' -Recurse) : $null + $privateVariableFiles = (Test-Path -Path $privateVariablesPath) ? (Get-ChildItem -Path $privateVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateVariableFiles.Count)]" $privateVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" } Write-Host '::endgroup::' $publicVariablesPath = Join-Path -Path $variablesPath -ChildPath 'public' - $publicVariableFiles = (Test-Path -Path $publicVariablesPath) ? - (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null + $publicVariableFiles = (Test-Path -Path $publicVariablesPath) ? (Get-ChildItem -Path $publicVariablesPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Public [$($publicVariableFiles.Count)]" $publicVariableFiles | ForEach-Object { Write-Host " - $($_.FullName)" @@ -85,16 +86,14 @@ BeforeAll { } Write-Host '::endgroup::' $privateClassPath = Join-Path -Path $classPath -ChildPath 'private' - $privateClassFiles = (Test-Path -Path $privateClassPath) ? - (Get-ChildItem -Path $privateClassPath -File -Filter '*.ps1' -Recurse) : $null + $privateClassFiles = (Test-Path -Path $privateClassPath) ? (Get-ChildItem -Path $privateClassPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Private [$($privateClassFiles.Count)]" $privateClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" } Write-Host '::endgroup::' $publicClassPath = Join-Path -Path $classPath -ChildPath 'public' - $publicClassFiles = (Test-Path -Path $publicClassPath) ? - (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null + $publicClassFiles = (Test-Path -Path $publicClassPath) ? (Get-ChildItem -Path $publicClassPath -File -Filter '*.ps1' -Recurse) : $null Write-Host "::group:: - Public [$($publicClassFiles.Count)]" $publicClassFiles | ForEach-Object { Write-Host " - $($_.FullName)" diff --git a/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 b/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 index 9bf1bb6..7a49dad 100644 --- a/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 +++ b/tests/outputTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path diff --git a/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 b/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 index 9bf1bb6..7a49dad 100644 --- a/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 +++ b/tests/srcTestRepo/tests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path diff --git a/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 b/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 index 9bf1bb6..7a49dad 100644 --- a/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 +++ b/tests/srcWithManifestTestRepo/tests/MyTests/PSModuleTest.Tests.ps1 @@ -1,5 +1,5 @@ [CmdletBinding()] -Param( +param( # Path to the module to test. [Parameter()] [string] $Path From b6fbfe5cd8798fb9b10a1885e027037f36dec820 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 5 Oct 2025 12:25:09 +0200 Subject: [PATCH 3/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Update=20Dependab?= =?UTF-8?q?ot=20configuration=20to=20include=20labels=20for=20GitHub=20Act?= =?UTF-8?q?ions=20(#102)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This pull request makes a small configuration update to the Dependabot settings. It adds default labels to pull requests created for GitHub Actions dependencies, making them easier to identify and filter. * Added the `dependencies` and `github-actions` labels to Dependabot PRs for GitHub Actions in `.github/dependabot.yml`. --- .github/dependabot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f57e1e9..53188fe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,5 +7,8 @@ version: 2 updates: - package-ecosystem: github-actions # See documentation for possible values directory: / # Location of package manifests + labels: + - dependencies + - github-actions schedule: interval: weekly From a4ca518fd2f2130e14c9cda3dfab5deb60d80ea6 Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Sun, 12 Oct 2025 14:30:05 +0200 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Encode=20all=20Po?= =?UTF-8?q?werShell=20files=20using=20UTF8=20with=20BOM=20(#103)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This pull request introduces a minor change to the `Planets.ps1` files in two test repositories. The only modification is the addition of a Unicode Byte Order Mark (BOM) at the beginning of each file, which does not affect script functionality but may impact how some editors interpret file encoding. - Added a BOM to the start of `tests/srcTestRepo/src/variables/public/Planets.ps1` - Added a BOM to the start of `tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1` --- tests/srcTestRepo/src/variables/public/Planets.ps1 | 2 +- tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/srcTestRepo/src/variables/public/Planets.ps1 b/tests/srcTestRepo/src/variables/public/Planets.ps1 index 736584b..5927bc5 100644 --- a/tests/srcTestRepo/src/variables/public/Planets.ps1 +++ b/tests/srcTestRepo/src/variables/public/Planets.ps1 @@ -1,4 +1,4 @@ -$script:Planets = @( +$script:Planets = @( @{ Name = 'Mercury' Mass = 0.330 diff --git a/tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1 b/tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1 index 736584b..5927bc5 100644 --- a/tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1 +++ b/tests/srcWithManifestTestRepo/src/variables/public/Planets.ps1 @@ -1,4 +1,4 @@ -$script:Planets = @( +$script:Planets = @( @{ Name = 'Mercury' Mass = 0.330 From 80b0364db8192e73f584603c68a127de171f881f Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Wed, 15 Oct 2025 13:21:20 +0200 Subject: [PATCH 5/6] =?UTF-8?q?=F0=9F=A9=B9=20[Patch]:=20Move=20documentat?= =?UTF-8?q?ion=20and=20link=20to=20Process-PSModule=20(#104)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description This pull request primarily cleans up and simplifies the documentation and metadata for the `Test-PSModule` GitHub Action. The most significant changes are the removal of detailed usage instructions and specifications from the `README.md`, and a simplification of the action's metadata in `action.yml`. **Documentation and metadata simplification:** * The `README.md` file has been drastically reduced, removing all detailed setup instructions, usage explanations, input/output tables, and specification details, leaving only a single-line description and a link to the PSModule framework. * The `action.yml` file has been simplified by removing the branding section and slightly adjusting the action name, making the metadata more concise. --- README.md | 186 +---------------------------------------------------- action.yml | 5 +- 2 files changed, 2 insertions(+), 189 deletions(-) diff --git a/README.md b/README.md index 8a9f1ba..fd73ab0 100644 --- a/README.md +++ b/README.md @@ -1,187 +1,3 @@ # Test-PSModule -Tests PowerShell module repos using PSModule framework rules. - -This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule). It is recommended to use the -[Process-PSModule workflow](https://github.com/PSModule/Process-PSModule) to automate the whole process of managing the PowerShell module. - -## Specifications and practices - -Test-PSModule enables: - -- [Test-Driven Development](https://testdriven.io/test-driven-development/) using [Pester](https://pester.dev) via [Invoke-Pester](https://github.com/PSModule/Invoke-Pester). - -## How it works - -- The action runs test on the module repository based on `Settings`: - - `SourceCode` - Tests source code style and standards based on PSModule framework rules. - - `Module` - Tests the module build module style and standards based on PSModule framework rules. - - The module is imported in its own context to avoid conflicts with other modules. -- The action returns the test results as action [outputs](#outputs). -- The following reports are calculated and uploaded as artifacts. This is done to support the action being run in matrix jobs. - - Test suite results. In [Process-PSModule](https://github.com/PSModule/Process-PSModule) this is evaluated in a later job by [Get-PesterTestResults](https://github.com/PSModule/Get-PesterTestResults) - - Code coverage results. In [Process-PSModule](https://github.com/PSModule/Process-PSModule) this is evaluated in a later job by [Get-PesterCodeCoverage](https://github.com/PSModule/Get-PesterCodeCoverage) - -The action fails if any of the tests fail or it fails to run the tests. -This is mitigated by the `continue-on-error` option in the workflow. - -## How to use it - -It is recommended to use the [Process-PSModule workflow](https://github.com/PSModule/Process-PSModule) to automate the whole process of managing the PowerShell module. - -To use the action, create a new file in the `.github/workflows` directory of the module repository and add the following content. -
-Workflow suggestion - before module is built - -```yaml -name: Test-PSModule - -on: [push] - -jobs: - Test-PSModule: - name: Test-PSModule - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Initialize environment - uses: PSModule/Initialize-PSModule@main - - - name: Test-PSModule - uses: PSModule/Test-PSModule@main - with: - Settings: SourceCode - -``` -
- -
-Workflow suggestion - after module is built - -```yaml -name: Test-PSModule - -on: [push] - -jobs: - Test-PSModule: - name: Test-PSModule - runs-on: ubuntu-latest - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: Initialize environment - uses: PSModule/Initialize-PSModule@main - - - name: Test-PSModule - uses: PSModule/Test-PSModule@main - with: - Settings: Module - -``` -
- -## Usage - -### Inputs - -| Name | Description | Required | Default | -| ---- | ----------- | -------- | ------- | -| `Name` | The name of the module to test. The name of the repository is used if not specified. | `false` | | -| `Settings` | The type of tests to run. Can be either `Module` or `SourceCode`. | `true` | | -| `Debug` | Enable debug output. | `false` | `'false'` | -| `Verbose` | Enable verbose output. | `false` | `'false'` | -| `Version` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | | -| `Prerelease` | Allow prerelease versions if available. | `false` | `'false'` | -| `WorkingDirectory` | The working directory to use for the action. This is the root folder where tests and outputs are expected. | `false` | `'.'` | -| `StepSummary_Mode` | Controls which tests to show in the GitHub step summary. Allows "Full" (all tests), "Failed" (only failed tests), or "None" (disable step summary). | `false` | `Failed` | -| `StepSummary_ShowTestOverview` | Controls whether to show the test overview table in the GitHub step summary. | `false` | `false` | -| `StepSummary_ShowConfiguration` | Controls whether to show the configuration details in the GitHub step summary. | `false` | `false` | -| `Run_ExcludePath` | Directories/files to exclude from the run. | `false` | | -| `Run_ScriptBlock` | ScriptBlocks containing tests to be executed. | `false` | | -| `Run_Container` | ContainerInfo objects containing tests to be executed. | `false` | | -| `Run_TestExtension` | Filter used to identify test files (e.g. `.Tests.ps1`). | `false` | | -| `Run_Exit` | Whether to exit with a non-zero exit code on failure. | `false` | | -| `Run_Throw` | Whether to throw an exception on test failure. | `false` | | -| `Run_SkipRun` | Discovery only, skip actual test run. | `false` | | -| `Run_SkipRemainingOnFailure` | Skips remaining tests after the first failure. Options: `None`, `Run`, `Container`, `Block`. | `false` | | -| `Filter_Tag` | Tags of Describe/Context/It blocks to run. | `false` | | -| `Filter_ExcludeTag` | Tags of Describe/Context/It blocks to exclude. | `false` | | -| `Filter_Line` | Filter by file + scriptblock start line (e.g. `C:\tests\file1.Tests.ps1:37`). | `false` | | -| `Filter_ExcludeLine` | Exclude by file + scriptblock start line. Precedence over `Filter_Line`. | `false` | | -| `Filter_FullName` | Full name of a test with wildcards, joined by dot. E.g. `*.describe Get-Item.test1` | `false` | | -| `CodeCoverage_Enabled` | Enable code coverage. | `false` | | -| `CodeCoverage_OutputFormat` | Format for the coverage report. Possible values: `JaCoCo`, `CoverageGutters`, `Cobertura`. | `false` | | -| `CodeCoverage_OutputPath` | Where to save the code coverage report (relative to the current dir). | `false` | | -| `CodeCoverage_OutputEncoding` | Encoding of the coverage file. | `false` | | -| `CodeCoverage_Path` | Files/directories to measure coverage on (by default, reuses `Path` from the general settings). | `false` | | -| `CodeCoverage_ExcludeTests` | Exclude tests themselves from coverage. | `false` | | -| `CodeCoverage_RecursePaths` | Recurse through coverage directories. | `false` | | -| `CodeCoverage_CoveragePercentTarget` | Desired minimum coverage percentage. | `false` | | -| `CodeCoverage_UseBreakpoints` | **Experimental**: When `false`, use a Profiler-based tracer instead of breakpoints. | `false` | | -| `CodeCoverage_SingleHitBreakpoints` | Remove breakpoints after first hit. | `false` | | -| `TestResult_Enabled` | Enable test-result output (e.g. NUnitXml, JUnitXml). | `false` | | -| `TestResult_OutputFormat` | Possible values: `NUnitXml`, `NUnit2.5`, `NUnit3`, `JUnitXml`. | `false` | | -| `TestResult_OutputPath` | Where to save the test-result report (relative path). | `false` | | -| `TestResult_OutputEncoding` | Encoding of the test-result file. | `false` | | -| `Should_ErrorAction` | Controls if `Should` throws on error. Use `Stop` to throw, or `Continue` to fail at the end. | `false` | | -| `Debug_ShowFullErrors` | Show Pester internal stack on errors. (Deprecated – overrides `Output.StackTraceVerbosity` to `Full`). | `false` | | -| `Debug_WriteDebugMessages` | Write debug messages to screen. | `false` | | -| `Debug_WriteDebugMessagesFrom` | Filter debug messages by source. Wildcards allowed. | `false` | | -| `Debug_ShowNavigationMarkers` | Write paths after every block/test for easy navigation in Visual Studio Code. | `false` | | -| `Debug_ReturnRawResultObject` | Returns an unfiltered result object, for development only. | `false` | | -| `Output_Verbosity` | Verbosity: `None`, `Normal`, `Detailed`, `Diagnostic`. | `false` | | -| `Output_StackTraceVerbosity` | Stacktrace detail: `None`, `FirstLine`, `Filtered`, `Full`. | `false` | | -| `Output_CIFormat` | CI format of error output: `None`, `Auto`, `AzureDevops`, `GithubActions`. | `false` | | -| `Output_CILogLevel` | CI log level: `Error` or `Warning`. | `false` | | -| `Output_RenderMode` | How to render console output: `Auto`, `Ansi`, `ConsoleColor`, `Plaintext`. | `false` | | -| `TestDrive_Enabled` | Enable `TestDrive`. | `false` | | -| `TestRegistry_Enabled` | Enable `TestRegistry`. | `false` | | - -### Outputs - -| Output | Description | -|-------------------------|--------------------------------------| -| `Outcome` | Outcome of the test run. | -| `Conclusion` | Conclusion status of test execution. | -| `Executed` | Indicates if tests were executed. | -| `Result` | Overall result (`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 tests executed. | - -## PSModule tests - -### SourceCode tests - -The [PSModule - SourceCode tests](./scripts/tests/SourceCode/PSModule/PSModule.Tests.ps1) verifies the following coding practices that the framework enforces: - -| ID | Category | Description | -|---------------------|---------------------|--------------------------------------------------------------------------------------------| -| NumberOfProcessors | General | Should use `[System.Environment]::ProcessorCount` instead of `$env:NUMBER_OF_PROCESSORS`. | -| Verbose | General | Should not contain `-Verbose` unless it is explicitly disabled with `:$false`. | -| OutNull | General | Should use `$null = ...` instead of piping output to `Out-Null`. | -| NoTernary | General | Should not use ternary operations to maintain compatibility with PowerShell 5.1 and below. | -| LowercaseKeywords | General | All PowerShell keywords should be written in lowercase. | -| FunctionCount | Functions (Generic) | Each script file should contain exactly one function or filter. | -| FunctionName | Functions (Generic) | Script filenames should match the name of the function or filter they contain. | -| CmdletBinding | Functions (Generic) | Functions should include the `[CmdletBinding()]` attribute. | -| ParamBlock | Functions (Generic) | Functions should have a parameter block (`param()`). | -| FunctionTest | Functions (Public) | All public functions/filters should have corresponding tests. | - -### Module tests - -The [PSModule - Module tests](./scripts/tests/Module/PSModule/PSModule.Tests.ps1) verifies the following coding practices that the framework enforces: - -| Name | Description | -| ------ | ----------- | -| Module Manifest exists | Verifies that a module manifest file is present. | -| Module Manifest is valid | Verifies that the module manifest file is valid. | +This GitHub Action is a part of the [PSModule framework](https://github.com/PSModule). diff --git a/action.yml b/action.yml index 2701134..f497d1a 100644 --- a/action.yml +++ b/action.yml @@ -1,9 +1,6 @@ -name: Test-PSModule (by PSModule) +name: Test-PSModule description: Test a PowerShell module before publishing the module to the PowerShell Gallery. author: PSModule -branding: - icon: check-square - color: gray-dark inputs: Name: From 7d94ed751a60973867e84ea8d44521e94b7c485d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 22:11:13 +0100 Subject: [PATCH 6/6] Bump actions/checkout from 5 to 6 (#105) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
Release notes

Sourced from actions/checkout's releases.

v6.0.0

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5.0.0...v6.0.0

v6-beta

What's Changed

Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config.

This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios.

v5.0.1

What's Changed

Full Changelog: https://github.com/actions/checkout/compare/v5...v5.0.1

Changelog

Sourced from actions/checkout's changelog.

Changelog

V6.0.0

V5.0.1

V5.0.0

V4.3.1

V4.3.0

v4.2.2

v4.2.1

v4.2.0

v4.1.7

v4.1.6

v4.1.5

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=5&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/Action-Test-Src-Default.yml | 2 +- .github/workflows/Action-Test-Src-WithManifest.yml | 2 +- .github/workflows/Action-Test-outputs.yml | 2 +- .github/workflows/Auto-Release.yml | 2 +- .github/workflows/Linter.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Action-Test-Src-Default.yml b/.github/workflows/Action-Test-Src-Default.yml index 286804f..4e816bc 100644 --- a/.github/workflows/Action-Test-Src-Default.yml +++ b/.github/workflows/Action-Test-Src-Default.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-Src-WithManifest.yml b/.github/workflows/Action-Test-Src-WithManifest.yml index a8e16df..f235aec 100644 --- a/.github/workflows/Action-Test-Src-WithManifest.yml +++ b/.github/workflows/Action-Test-Src-WithManifest.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Action-Test uses: ./ diff --git a/.github/workflows/Action-Test-outputs.yml b/.github/workflows/Action-Test-outputs.yml index 2e25ae1..7ce8b43 100644 --- a/.github/workflows/Action-Test-outputs.yml +++ b/.github/workflows/Action-Test-outputs.yml @@ -24,7 +24,7 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Action-Test uses: ./ diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index 50a5a41..976b40c 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -26,7 +26,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Auto-Release uses: PSModule/Auto-Release@v1 diff --git a/.github/workflows/Linter.yml b/.github/workflows/Linter.yml index 94f34b0..1962629 100644 --- a/.github/workflows/Linter.yml +++ b/.github/workflows/Linter.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 with: fetch-depth: 0