-
Notifications
You must be signed in to change notification settings - Fork 191
47 lines (47 loc) · 1.59 KB
/
run-unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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