-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.44 KB
/
Copy pathAction-Test.yml
File metadata and controls
53 lines (46 loc) · 1.44 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: Action-Test
run-name: 'Action-Test - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}'
on:
workflow_dispatch:
pull_request:
schedule:
- cron: '0 0 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
Action-Test:
name: Action-Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run Pester tests
id: pester
uses: PSModule/Invoke-Pester@v4
with:
Path: ./tests
Run_Path: ./scripts
TestResult_TestSuiteName: Resolve-PSModuleVersion
- name: Check test outcome
shell: pwsh
if: always()
env:
OUTCOME: ${{ steps.pester.outcome }}
PASSED: ${{ steps.pester.outputs.PassedCount }}
FAILED: ${{ steps.pester.outputs.FailedCount }}
TOTAL: ${{ steps.pester.outputs.TotalCount }}
run: |
Write-Host "Outcome: [$env:OUTCOME]"
Write-Host "Passed: [$env:PASSED]"
Write-Host "Failed: [$env:FAILED]"
Write-Host "Total: [$env:TOTAL]"
if ($env:OUTCOME -ne 'success') {
Write-Error 'Pester tests did not pass.'
exit 1
}