Merge pull request #837 from dfinke/UpdatePesterInstall

Prevent install of Pester v5
This commit is contained in:
Doug Finke
2020-05-04 18:52:27 -04:00
committed by GitHub
3 changed files with 66 additions and 64 deletions

View File

@@ -225,7 +225,9 @@ if (-not $SkipPostChecks) {
PivotData = @{RuleName = 'Count' }
PivotRows = 'Severity', 'RuleName'
PivotTotals = 'Rows'
PivotChartDefinition = $chartDef }}
PivotChartDefinition = $chartDef
}
}
}
Remove-Item -Path $ExcelParams['Path'] -ErrorAction SilentlyContinue
$AnalyzerResults | Export-Excel @ExcelParams
@@ -245,7 +247,7 @@ if (Test-Path $script:warningfile) {
if (-not $SkipPesterTests -and (Get-ChildItem -Recurse *.tests.ps1)) {
Import-Module -Force $outputFile
if (-not (Get-Module -ListAvailable pester | Where-Object -Property version -ge ([version]::new(4, 4, 1)))) {
Install-Module Pester -Force -SkipPublisherCheck
Install-Module Pester -Force -SkipPublisherCheck -MaximumVersion 4.99.99
}
Import-Module Pester
$PesterOutputPath = Join-Path $pwd -ChildPath ('TestResultsPS{0}.xml' -f $PSVersionTable.PSVersion)

View File

@@ -25,12 +25,12 @@ skip_commits:
# Scripts that run after cloning repository
install:
- ps: 'Install-Module -Name Pester -Force -SkipPublisherCheck'
- ps: 'Install-Module -Name Assert -Force'
- ps: 'Install-Module -Name Pester -Force -SkipPublisherCheck -MaximumVersion 4.99.99'
- ps: 'Install-Module -Name Assert -Force -MaximumVersion 4.99.99'
# PowerShell Core
- ps: '& .\CI\InstallPowerShell.ps1 -Version "7.0.0-preview.4"' # Install other PowerShell Core version (Optional)
- pwsh: 'Install-Module -Name Pester -Force'
- pwsh: 'Install-Module -Name Assert -Force'
- pwsh: 'Install-Module -Name Pester -Force -MaximumVersion 4.99.99'
- pwsh: 'Install-Module -Name Assert -Force -MaximumVersion 4.99.99'
# To run your custom scripts instead of automatic tests
test_script:
@@ -56,8 +56,8 @@ for:
# Scripts that run after cloning repository
install:
- pwsh: '& .\CI\CI.ps1 -Initialize' # Set AppVeyor build version
- pwsh: 'Install-Module -Name Pester -Force'
- pwsh: 'Install-Module -Name Assert -Force'
- pwsh: 'Install-Module -Name Pester -Force -MaximumVersion 4.99.99'
- pwsh: 'Install-Module -Name Assert -Force -MaximumVersion 4.99.99'
# To run your custom scripts instead of automatic tests
test_script:
- pwsh: '& .\CI\CI.ps1 -Test'

View File

@@ -20,7 +20,7 @@ jobs:
vmImage: 'windows-latest'
steps:
- powershell: 'Install-Module -Name Pester -Force -SkipPublisherCheck'
- powershell: 'Install-Module -Name Pester -Force -SkipPublisherCheck -MaximumVersion 4.99.99'
displayName: 'Update Pester'
- powershell: './CI/CI.ps1 -Test'
displayName: 'Install and Test'
@@ -49,7 +49,7 @@ jobs:
vmImage: 'windows-latest'
steps:
- pwsh: 'Install-Module -Name Pester -Force'
- pwsh: 'Install-Module -Name Pester -Force -MaximumVersion 4.99.99'
displayName: 'Update Pester'
- pwsh: './CI/CI.ps1 -Test'
displayName: 'Install and Test'
@@ -65,7 +65,7 @@ jobs:
vmImage: 'ubuntu-latest'
steps:
- powershell: 'Install-Module -Name Pester -Force'
- powershell: 'Install-Module -Name Pester -Force -MaximumVersion 4.99.99'
displayName: 'Update Pester'
- powershell: './CI/CI.ps1 -Test'
displayName: 'Install and Test'
@@ -83,7 +83,7 @@ jobs:
steps:
- script: brew install mono-libgdiplus
displayName: 'Install mono-libgdiplus'
- powershell: 'Install-Module -Name Pester -Force'
- powershell: 'Install-Module -Name Pester -Force -MaximumVersion 4.99.99'
displayName: 'Update Pester'
- powershell: './CI/CI.ps1 -Test'
displayName: 'Install and Test'