File tree Expand file tree Collapse file tree 1 file changed +35
-4
lines changed
Expand file tree Collapse file tree 1 file changed +35
-4
lines changed Original file line number Diff line number Diff line change 11name : PowerShell Testing
2- on : [push, pull_request]
2+
3+ on :
4+ push :
5+ branches : [ main, develop ]
6+ pull_request :
7+ branches : [ main ]
8+
39jobs :
410 test :
511 runs-on : windows-latest
12+
613 steps :
7- - uses : actions/checkout@v3
8- - name : Test PowerShell Script
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Setup PowerShell
18+ shell : pwsh
919 run : |
10- Invoke-Pester Tests/ -OutputFormat NUnitXml
20+ Set-PSRepository PSGallery -InstallationPolicy Trusted
21+ Install-Module -Name Pester -Force -SkipPublisherCheck
22+
23+ - name : Run Pester Tests
24+ shell : pwsh
25+ run : |
26+ Invoke-Pester -Path "Tests/" -OutputFormat NUnitXml -OutputFile "TestResults.xml" -CI
27+
28+ - name : Publish Test Results
29+ uses : dorny/test-reporter@v1
30+ if : always()
31+ with :
32+ name : PowerShell Tests
33+ path : TestResults.xml
34+ reporter : java-junit
35+
36+ - name : Upload Test Results
37+ uses : actions/upload-artifact@v3
38+ if : always()
39+ with :
40+ name : test-results
41+ path : TestResults.xml
You can’t perform that action at this time.
0 commit comments