-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (44 loc) · 1.46 KB
/
ci.yml
File metadata and controls
50 lines (44 loc) · 1.46 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
name: CI
on:
pull_request:
push:
workflow_dispatch:
jobs:
windows:
name: ${{ matrix.name }}
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
include:
- name: Windows PowerShell 5.1
ps_exe: powershell
- name: PowerShell 7
ps_exe: pwsh
steps:
- uses: actions/checkout@v4
- name: Show PowerShell Version
shell: pwsh
run: |
$exe = '${{ matrix.ps_exe }}'
& $exe -NoProfile -Command '$PSVersionTable | Format-List'
- name: Install Dependencies
shell: pwsh
run: |
$exe = '${{ matrix.ps_exe }}'
$installScript = @'
if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) {
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Scope CurrentUser -Force
}
Set-PSRepository PSGallery -InstallationPolicy Trusted
Install-Module PSScriptAnalyzer -Scope CurrentUser -RequiredVersion 1.22.0 -Force
Install-Module Pester -Scope CurrentUser -RequiredVersion 5.7.1 -Force
Install-Module posh-git -Scope CurrentUser -Force
Install-Module git-aliases -Scope CurrentUser -Force
'@
& $exe -NoProfile -Command $installScript
- name: Run Lint and Tests
shell: pwsh
run: |
$exe = '${{ matrix.ps_exe }}'
& $exe -NoProfile -File .\tools\ci.ps1 -CurrentShellOnly