-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (28 loc) · 1.03 KB
/
PesterTests.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
name: Pester
on: push
permissions:
contents: read
jobs:
pester-tests:
name: Pester tests
runs-on: windows-latest
steps:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- name: Check out repository code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Perform all Pester tests from the SBOMResearcher tests directory
shell: pwsh
run: |
Set-PSRepository psgallery -InstallationPolicy trusted
Install-Module -Name Pester -Confirm:$false -RequiredVersion 5.6.1 -Force
. .\SBOMResearcher.ps1
Invoke-Pester -Script .\tests -OutputFile "./Pester.XML" -OutputFormat "NUnitXML" -Passthru -Verbose
- name: Upload test results
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
with:
name: Pester-Version-Tests
path: Pester.XML
if: ${{ always() }}