Skip to content

Commit

Permalink
Drop support of PowerShell 3, 4, 6.2, and 7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nohwnd committed Apr 6, 2024
1 parent 90cc57d commit 370e294
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 53 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ The example above also has an [annotated and production ready version here](docs

## Installation

Pester runs on Windows, Linux, MacOS and anywhere else thanks to PowerShell. It is compatible with Windows PowerShell 3, 4, 5, 6 and 7.
Pester runs on Windows, Linux, MacOS and anywhere else thanks to PowerShell. It is compatible with Windows PowerShell 5.1 and PowerShell 7.2 and newer.

Pester 3 comes pre-installed with Windows 10, but we recommend updating, by running this PowerShell command _as administrator_:

Expand Down
47 changes: 0 additions & 47 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,50 +127,3 @@ stages:
failTaskOnFailedTests: true
condition: succeededOrFailed()
timeoutInMinutes: 20
- job:
workspace:
clean: all
strategy:
matrix:
PS3:
agent: 'ps3'
pwsh: false
PS4:
agent: 'ps4'
pwsh: false
PS6_2:
agent: 'ps6'
pwsh: true
pool:
name: Default
demands:
- agent.name -equals $(agent)
steps:
- checkout: none
- task: DownloadPipelineArtifact@2
inputs:
buildType: 'current'
artifactName: 'all'
targetPath: '$(Build.SourcesDirectory)'
- task: PowerShell@2
displayName: 'Test Pester'
inputs:
targetType: 'inline'
pwsh: $(pwsh)
script: |
& ./test.ps1 -CI -PassThru -NoBuild
workingDirectory: '$(Build.SourcesDirectory)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: 'JaCoCo'
summaryFileLocation: 'coverage.xml'
pathToSources: 'src/'
failIfCoverageEmpty: false
condition: succeededOrFailed()
- task: PublishTestResults@2
inputs:
testResultsFormat: 'NUnit'
testResultsFiles: 'testResults.xml'
failTaskOnFailedTests: true
condition: succeededOrFailed()
timeoutInMinutes: 20
37 changes: 32 additions & 5 deletions src/Pester.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
RootModule = 'Pester.psm1'

# Version number of this module.
ModuleVersion = '5.5.0'
ModuleVersion = '5.6.0'

# ID used to uniquely identify this module
GUID = 'a699dea5-2c73-4616-a270-1f7abb777e71'
Expand All @@ -22,7 +22,7 @@
Description = 'Pester provides a framework for running BDD style Tests to execute and validate PowerShell commands inside of PowerShell and offers a powerful set of Mocking Functions that allow tests to mimic and mock the functionality of any command inside of a piece of PowerShell code being tested. Pester tests can execute any command or script that is accessible to a pester test file. This can include functions, Cmdlets, Modules and scripts. Pester can be run in ad hoc style in a console or it can be integrated into the Build scripts of a Continuous Integration system.'

# Minimum version of the Windows PowerShell engine required by this module
PowerShellVersion = '3.0'
PowerShellVersion = '5.1'

# Type files (.ps1xml) to be loaded when importing this module
TypesToProcess = @()
Expand Down Expand Up @@ -66,6 +66,33 @@
'New-PesterContainer'
'New-PesterConfiguration'

# assert
'Assert-False'
'Assert-True'
'Assert-All'
'Assert-Any'
'Assert-Contain'
'Assert-NotContain'
'Assert-Equivalent'
'Assert-Throw'
'Assert-Equal'
'Assert-GreaterThan'
'Assert-GreaterThanOrEqual'
'Assert-LessThan'
'Assert-LessThanOrEqual'
'Assert-NotEqual'
'Assert-NotNull'
'Assert-NotSame'
'Assert-NotType'
'Assert-Null'
'Assert-Same'
'Assert-Type'
'Assert-Like'
'Assert-NotLike'
'Assert-StringEqual'
'Assert-StringNotEqual'


# legacy
'Assert-VerifiableMock'
'Assert-MockCalled'
Expand Down Expand Up @@ -96,7 +123,7 @@

PrivateData = @{
# PSData is module packaging and gallery metadata embedded in PrivateData
# It's for rebuilding PowerShellGet (and PoshCode) NuGet-style packages
# It's for rebuilding PowerSh5llGet (and PoshCode) NuGet-style packages
# We had to do this because it's the only place we're allowed to extend the manifest
# https://connect.microsoft.com/PowerShell/feedback/details/421837
PSData = @{
Expand All @@ -116,14 +143,14 @@
LicenseUri = "https://www.apache.org/licenses/LICENSE-2.0.html"

# Release notes for this particular version of the module
ReleaseNotes = 'https://github.com/pester/Pester/releases/tag/5.5.0'
ReleaseNotes = 'https://github.com/pester/Pester/releases/tag/5.6.0'

# Prerelease string of this module
Prerelease = ''
}

# Minimum assembly version required
RequiredAssemblyVersion = '5.5.0'
RequiredAssemblyVersion = '5.6.0'
}

# HelpInfo URI of this module
Expand Down

0 comments on commit 370e294

Please sign in to comment.