-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (40 loc) · 1.11 KB
/
test-powershell.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
48
name: PowerShell Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Start Docker Desktop
run: |
# Wait for Docker to start
$retries = 0
do {
Start-Sleep -s 5
$retries++
docker info
} while ($LASTEXITCODE -ne 0 -and $retries -lt 12)
shell: powershell
- name: Install Pester
run: |
Install-Module -Name Pester -Force -SkipPublisherCheck
Import-Module Pester
shell: powershell
- name: Run Basic Tests
run: |
Invoke-Pester ./tests/Test-DockerGracefulShutdown.ps1 -Output Detailed
shell: powershell
- name: Run Dependency Tests
run: |
Invoke-Pester ./tests/Test-Dependencies.ps1 -Output Detailed
shell: powershell
- name: Check Script Analysis
run: |
Install-Module -Name PSScriptAnalyzer -Force
Import-Module PSScriptAnalyzer
Invoke-ScriptAnalyzer -Path . -Recurse
shell: powershell