From 6c48f687bda71713e42fbaabd7574daa9324a1ac Mon Sep 17 00:00:00 2001 From: Haritha <73516759+HarithaVattikuti@users.noreply.github.com> Date: Mon, 3 Nov 2025 11:53:28 -0600 Subject: [PATCH] Install Pester before running tests Added a step to install Pester before running tests. --- .github/workflows/build-tool-packages.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-tool-packages.yml b/.github/workflows/build-tool-packages.yml index f2a4dbe..c41f35f 100644 --- a/.github/workflows/build-tool-packages.yml +++ b/.github/workflows/build-tool-packages.yml @@ -160,20 +160,37 @@ jobs: 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 } + - name: Install Pester + run: Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck + - name: Run tests if: env.excludewinarm == 'true' - env: + env: VERSION: ${{ inputs.tool-version }} run: | - Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck Import-Module Pester $toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}") Invoke-Pester -Configuration @{ Run = @{ Path = "./$toolName.Tests.ps1" } Should = @{ ErrorAction = 'Continue' } Output = @{ EnableExit = $true } - } + } working-directory: ./tests + + # - name: Run tests + # if: env.excludewinarm == 'true' + # env: + # VERSION: ${{ inputs.tool-version }} + # run: | + # Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck + # Import-Module Pester + # $toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}") + # Invoke-Pester -Configuration @{ + # Run = @{ Path = "./$toolName.Tests.ps1" } + # Should = @{ ErrorAction = 'Continue' } + # Output = @{ EnableExit = $true } + # } + # working-directory: ./tests publish_release: name: Publish release