Compare commits

..

4 Commits

Author SHA1 Message Date
Haritha
816a9a3331 Refactor Pester installation step in workflow 2025-11-03 12:07:42 -06:00
Haritha
6c48f687bd Install Pester before running tests
Added a step to install Pester before running tests.
2025-11-03 11:53:28 -06:00
Haritha
e60ec8ae98 Update Pester invocation with configuration options 2025-11-03 11:29:12 -06:00
HarithaVattikuti
db2ae0a36e chore: update macOS version in build workflow to 15-intel 2025-11-03 10:38:51 -06:00

View File

@@ -147,7 +147,7 @@ jobs:
- name: Setup Go ${{ inputs.tool-version }}
if: inputs.tool-name == 'go'
uses: actions/setup-go@v6
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.tool-version }}
@@ -161,7 +161,6 @@ jobs:
for ($i = 0; $i -lt 200; $i++) { Get-Random }
- name: Ensure Pester Installed
if: env.excludewinarm == 'true'
run: |
$module = Get-Module -ListAvailable -Name Pester
if (-not $module -or ($module.Version -lt [Version]"5.0.0")) {
@@ -170,17 +169,32 @@ jobs:
- name: Run tests
if: env.excludewinarm == 'true'
env:
env:
VERSION: ${{ inputs.tool-version }}
run: |
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 }
}
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
@@ -228,7 +242,7 @@ jobs:
}
- name: Upload release assets
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
@@ -252,7 +266,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Trigger "Create Pull Request" workflow
uses: actions/github-script@v8
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |