Merge pull request #135 from mikhailkoliada/migrate_to_pester5

Migrate build pipeline to Pester v5
This commit is contained in:
Mikhail Timofeev 2022-01-25 11:28:40 +03:00 committed by GitHub
commit 7e70acf5f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 25 deletions

View File

@ -146,16 +146,13 @@ jobs:
- name: Run tests
run: |
Install-Module Pester -Force -Scope CurrentUser -RequiredVersion 4.10.1
Install-Module Pester -Force -Scope CurrentUser
Import-Module Pester
$pesterParams = @{
Path="./python-tests.ps1";
Parameters=@{
$pesterContainer = New-PesterContainer -Path './python-tests.ps1' -Data @{
Version="${{ env.VERSION }}";
Platform="${{ matrix.platform }}";
}
}
$Result = Invoke-Pester -PassThru -Script $pesterParams
$Result = Invoke-Pester -Container $pesterContainer -PassThru
if ($Result.FailedCount -gt 0) {
$host.SetShouldExit($Result.FailedCount)
exit $Result.FailedCount

View File

@ -9,6 +9,7 @@ Import-Module (Join-Path $PSScriptRoot "../helpers/pester-extensions.psm1")
Import-Module (Join-Path $PSScriptRoot "../helpers/common-helpers.psm1")
Import-Module (Join-Path $PSScriptRoot "../builders/python-version.psm1")
BeforeAll {
function Analyze-MissingModules([string] $buildOutputLocation) {
$searchStringStart = "Failed to build these modules:"
$searchStringEnd = "running build_scripts"
@ -33,6 +34,7 @@ function Analyze-MissingModules([string] $buildOutputLocation) {
return 0
}
}
Describe "Tests" {
It "Python version" {