mirror of
https://github.com/actions/versions-package-tools.git
synced 2025-12-10 03:13:23 +00:00
Install Pester before running tests
Added a step to install Pester before running tests.
This commit is contained in:
23
.github/workflows/build-tool-packages.yml
vendored
23
.github/workflows/build-tool-packages.yml
vendored
@@ -160,20 +160,37 @@ 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
|
||||||
|
run: Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
if: env.excludewinarm == 'true'
|
if: env.excludewinarm == 'true'
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ inputs.tool-version }}
|
VERSION: ${{ inputs.tool-version }}
|
||||||
run: |
|
run: |
|
||||||
Install-Module Pester -Force -Scope CurrentUser -SkipPublisherCheck
|
|
||||||
Import-Module Pester
|
Import-Module Pester
|
||||||
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
|
$toolName = (Get-Culture).TextInfo.ToTitleCase("${{ inputs.tool-name }}")
|
||||||
Invoke-Pester -Configuration @{
|
Invoke-Pester -Configuration @{
|
||||||
Run = @{ Path = "./$toolName.Tests.ps1" }
|
Run = @{ Path = "./$toolName.Tests.ps1" }
|
||||||
Should = @{ ErrorAction = 'Continue' }
|
Should = @{ ErrorAction = 'Continue' }
|
||||||
Output = @{ EnableExit = $true }
|
Output = @{ EnableExit = $true }
|
||||||
}
|
}
|
||||||
working-directory: ./tests
|
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:
|
publish_release:
|
||||||
name: Publish release
|
name: Publish release
|
||||||
|
|||||||
Reference in New Issue
Block a user