-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.11 KB
/
ci.yml
File metadata and controls
48 lines (41 loc) · 1.11 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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:
concurrency:
group: tests-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
pwsh-tests:
name: PowerShell tests
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Pester and PSScriptAnalyzer
run: |
pwsh -Command "Install-Module Pester -MinimumVersion 5.7.0 -Force -Scope CurrentUser"
pwsh -Command "Install-Module PSScriptAnalyzer -Force -Scope CurrentUser"
- name: Run PowerShell test suite
shell: pwsh
env:
TERM: dumb
NO_COLOR: "1"
run: |
$PSStyle.OutputRendering = 'PlainText'
./tests/run-tests.ps1
- name: Upload Pester results
if: always()
uses: actions/upload-artifact@v4
with:
name: pester-results
path: tests/pwsh/results/pester-results.xml
if-no-files-found: warn
retention-days: 7