Skip to content

Commit 677c2aa

Browse files
committed
Update powershell-test.yml
1 parent 616a305 commit 677c2aa

1 file changed

Lines changed: 11 additions & 24 deletions

File tree

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,17 @@
1-
name: PowerShellTest
2-
1+
name: Test PowerShell
32
on: push
43

54
jobs:
6-
first_job:
7-
runs-on: windows-2019
5+
pester-test:
6+
name: Pester test
7+
runs-on: windows-latest
88
steps:
9-
- name: Checkout
10-
uses: actions/checkout@v2
11-
12-
- name: Display hello world pwsh
13-
run: |
14-
write-host "hello world pwsh"
15-
$PSVersionTable
9+
- name: Check out repository code
10+
uses: actions/checkout@v4
11+
- name: Perform a Pester test from the command-line
12+
shell: pwsh
13+
run: Test-Path resultsfile.log | Should -Be $true
14+
- name: Perform a Pester test from the setup.ps1 file
1615
shell: pwsh
17-
18-
- name: Display hello world powershell
1916
run: |
20-
write-host "hello world pwsh"
21-
$PSVersionTable
22-
shell: powershell
23-
24-
- name: run ps1File cmd
25-
run: powershell -NoProfile -ExecutionPolicy Unrestricted ./setup.ps1
26-
shell: cmd
27-
28-
- name: run ps1File pwsh
29-
run: powershell -NoProfile -ExecutionPolicy Unrestricted ./setup.ps1
30-
shell: pwsh
17+
Invoke-Pester Unit.setup.ps1 -Passthru

0 commit comments

Comments
 (0)