-
Notifications
You must be signed in to change notification settings - Fork 382
64 lines (54 loc) · 1.49 KB
/
ci-test.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: CI Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
ci:
name: pester
strategy:
matrix:
os: [ windows-latest, macos-latest, ubuntu-latest ]
runs-on: ${{ matrix.os }}
env:
DOTNET_NOLOGO: true
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dotnet
uses: actions/setup-dotnet@v4
with:
cache: true
cache-dependency-path: '**/*.csproj'
- name: Install PSResources
run: ./tools/installPSResources.ps1
shell: pwsh
- name: Build
run: ./build.ps1 -Configuration Release -All
shell: pwsh
- name: Package
run: ./build.ps1 -BuildNupkg
shell: pwsh
- name: Test
run: ./build.ps1 -Test
shell: pwsh
- name: Test Windows PowerShell
run: |
Install-Module Pester -Scope CurrentUser -Force -SkipPublisherCheck
./build.ps1 -Test
if: matrix.os == 'windows-latest'
shell: powershell
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: PSScriptAnalyzer-package-${{ matrix.os }}
path: out/**/*.nupkg
- name: Upload test results
uses: actions/upload-artifact@v4
if: always()
with:
name: PSScriptAnalyzer-tests-${{ matrix.os }}
path: testResults.xml