-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 954 Bytes
/
test-powershell.yml
File metadata and controls
41 lines (34 loc) · 954 Bytes
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
name: PowerShell Testing
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup PowerShell
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Pester -Force -SkipPublisherCheck
- name: Run Pester Tests
shell: pwsh
run: |
Invoke-Pester -Path "Tests/" -OutputFormat NUnitXml -OutputFile "TestResults.xml" -CI
- name: Publish Test Results
uses: dorny/test-reporter@v1
if: always()
with:
name: PowerShell Tests
path: TestResults.xml
reporter: java-junit
- name: Upload Test Results
uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: TestResults.xml