diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 0a48b30fb..e434a638d 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -46,7 +46,7 @@ jobs: - name: Test Windows PowerShell if: matrix.os == 'windows-latest' run: | - Install-Module Pester -Scope CurrentUser -Force -SkipPublisherCheck + Install-Module Pester -RequiredVersion 6.0.1 -Scope CurrentUser -Force -SkipPublisherCheck ./build.ps1 -Test -Verbose shell: powershell diff --git a/README.md b/README.md index 24f2704ff..0d3405bf2 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ To install **PSScriptAnalyzer** from source code: - If building for Windows PowerShell versions, then the .NET Framework 4.6.2 [targeting pack](https://dotnet.microsoft.com/en-us/download/dotnet-framework/net462) (also referred to as developer/targeting pack) need to be installed. This is only possible on Windows. - Optional but recommended for development: [Visual Studio 2022](https://www.visualstudio.com/downloads) - Or [Visual Studio Code](https://code.visualstudio.com/download) -- [Pester v5 PowerShell module, available on PowerShell Gallery](https://github.com/pester/Pester) +- [Pester v6 PowerShell module, available on PowerShell Gallery](https://github.com/pester/Pester) - [PlatyPS PowerShell module, available on PowerShell Gallery](https://github.com/PowerShell/platyPS/releases) ### Steps @@ -154,7 +154,7 @@ built-in rules. Pester-based ScriptAnalyzer Tests are located in `path/to/PSScriptAnalyzer/Tests` folder. -- Ensure [Pester](https://www.powershellgallery.com/packages/Pester) of at least version 5.3 is installed +- Ensure [Pester](https://www.powershellgallery.com/packages/Pester) of at least version 6.0 is installed - In the root folder of your local repository, run: ```powershell diff --git a/Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1 b/Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1 index 6e22acc32..56ed8b9fe 100644 --- a/Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1 +++ b/Tests/Rules/UseIdenticalMandatoryParametersForDSC.tests.ps1 @@ -32,7 +32,7 @@ Describe "UseIdenticalMandatoryParametersForDSC" { } # todo add a test to check one violation per function - It "Should find a violations" -pending { + It "Should find a violations" -Skip { $violations.Count | Should -Be 0 } } diff --git a/Tests/Rules/UseToExportFieldsInManifest.tests.ps1 b/Tests/Rules/UseToExportFieldsInManifest.tests.ps1 index 5fa68aa68..c182c4f8f 100644 --- a/Tests/Rules/UseToExportFieldsInManifest.tests.ps1 +++ b/Tests/Rules/UseToExportFieldsInManifest.tests.ps1 @@ -87,7 +87,7 @@ Describe "UseManifestExportFields" { $results[0].Extent.Text | Should -Be "'*'" } - It "suggests corrections for AliasesToExport with wildcard" -pending:($IsCoreClr) { + It "suggests corrections for AliasesToExport with wildcard" -Skip:($IsCoreClr) { $violations = Run-PSScriptAnalyzerRule $testManifestBadAliasesWildcardPath $violationFilepath = Join-path $testManifestPath $testManifestBadAliasesWildcardPath Test-CorrectionExtent $violationFilepath $violations[0] 1 "'*'" "@('gbar', 'gfoo')" diff --git a/tools/installPSResources.ps1 b/tools/installPSResources.ps1 index 48ab81bdd..e9f1686ef 100644 --- a/tools/installPSResources.ps1 +++ b/tools/installPSResources.ps1 @@ -18,7 +18,7 @@ Install-PSResource -Verbose -TrustRepository -RequiredResource @{ repository = $PSRepository } Pester = @{ - version = "5.7.1" + version = "6.0.1" repository = $PSRepository } }