Merge pull request #773 from luis-gasparschroeder/json-format-piping #1141
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| |
name: RunPester | |
on: | |
workflow_dispatch: | |
push: | |
pull_request: | |
jobs: | |
TestPowerShellOnLinux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: InstallPester | |
id: InstallPester | |
shell: pwsh | |
run: | | |
$Parameters = @{} | |
$Parameters.PesterMaxVersion = ${env:PesterMaxVersion} | |
foreach ($k in @($parameters.Keys)) { | |
if ([String]::IsNullOrEmpty($parameters[$k])) { | |
$parameters.Remove($k) | |
} | |
} | |
Write-Host "::debug:: InstallPester $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" | |
& './arm-ttk/GitHubWorkflow/Steps/InstallPester.ps1' @Parameters | |
- name: RunPester | |
id: RunPester | |
shell: pwsh | |
run: | | |
$Parameters = @{} | |
$Parameters.ModulePath = ${env:ModulePath} | |
$Parameters.PesterMaxVersion = ${env:PesterMaxVersion} | |
foreach ($k in @($parameters.Keys)) { | |
if ([String]::IsNullOrEmpty($parameters[$k])) { | |
$parameters.Remove($k) | |
} | |
} | |
Write-Host "::debug:: RunPester $(@(foreach ($p in $Parameters.GetEnumerator()) {'-' + $p.Key + ' ' + $p.Value}) -join ' ')" | |
& './arm-ttk/GitHubWorkflow/Steps/RunPester.ps1' @Parameters | |
- name: PublishTestResults | |
uses: actions/upload-artifact@v2 | |
with: | |
name: PesterResults | |
path: '**.TestResults.xml' | |
if: ${{always()}} | |
env: | |
ModulePath: .\arm-ttk\arm-ttk.psd1 |