-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.67 KB
/
powershell.yml
File metadata and controls
53 lines (44 loc) · 1.67 KB
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
49
50
51
52
53
name: PowerShell Challenges
on:
push:
branches: [ "main" ]
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
permissions:
contents: read
jobs:
test:
name: Test
permissions:
contents: read
security-events: write
actions: read
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install module(s)
shell: pwsh
run: |
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module -Name Pester -Force -Scope CurrentUser
- name: Run Pester Tests
shell: pwsh
# Pester results will go into a new folder called "pester".
run: |
New-Item -Path ".\pester" -type Directory
.\utils\pester-agent.ps1 -TestPath ".\tests\incremental-game-datetime.Tests.ps1" -OutputFile "pester\incremental-game-datetime-pester-results.xml" -CodeCoverageFile "pester\incremental-game-datetime-pester-coverage.xml"
.\utils\pester-agent.ps1 -TestPath ".\tests\powxn.Tests.ps1" -OutputFile "pester\powxn-pester-results.xml" -CodeCoverageFile "pester\powxn-pester-coverage.xml"
.\utils\pester-agent.ps1 -TestPath ".\tests\valid-phone-numbers.Tests.ps1" -OutputFile "pester\valid-phone-numbers-pester-results.xml" -CodeCoverageFile "pester\valid-phone-numbers-pester-coverage.xml"
- name: Upload Pester reports
if: ${{ success() }}
uses: actions/upload-artifact@v7
with:
name: pester-report
path: |
pester/
if-no-files-found: warn
retention-days: 0
compression-level: 6
overwrite: false
include-hidden-files: false