Refactor Pester installation step in workflow

This commit is contained in:
Haritha
2025-11-03 12:07:42 -06:00
committed by GitHub
parent 6c48f687bd
commit 816a9a3331

View File

@@ -160,9 +160,13 @@ jobs:
Write-Host "to determine if ${{ inputs.tool-name }} version was consumed from cache or if it was downloaded" Write-Host "to determine if ${{ inputs.tool-name }} version was consumed from cache or if it was downloaded"
for ($i = 0; $i -lt 200; $i++) { Get-Random } for ($i = 0; $i -lt 200; $i++) { Get-Random }
- name: Install Pester - name: Ensure Pester Installed
run: Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck run: |
$module = Get-Module -ListAvailable -Name Pester
if (-not $module -or ($module.Version -lt [Version]"5.0.0")) {
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
}
- name: Run tests - name: Run tests
if: env.excludewinarm == 'true' if: env.excludewinarm == 'true'
env: env: