We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 696a045 commit 32993e5Copy full SHA for 32993e5
ci-steps.yml
@@ -29,7 +29,13 @@ steps:
29
30
# We run tests on Windows PowerShell. Changing to PowerShell core would need changes to the tests
31
- powershell: |
32
- Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -RequiredVersion 4.10.1
+ $pester5 = Get-Module -Name Pester -ListAvailable | Where-Object { $_.Version.Major -ge 5 }
33
+
34
+ if ($pester5) {
35
+ Write-Verbose -Message "Pester version 5+ found. Uninstalling it." -Verbose
36
+ Uninstall-Module -Name Pester -MinimumVersion 5.0.0 -Verbose
37
+ }
38
+ Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck -RequiredVersion 4.10.1 -Verbose
39
Import-Module "$(Build.SourcesDirectory)/tests/PowerShellDocsTests.psm1" -Force
40
Invoke-Test
41
displayName: Test
0 commit comments