Skip to content

Commit 08ddd7d

Browse files
committed
Fix Unrecognized named-value: 'matrix'
1 parent 79dc78f commit 08ddd7d

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,31 @@ on:
77

88
jobs:
99
windows:
10+
name: ${{ matrix.name }}
1011
runs-on: windows-latest
1112
strategy:
1213
fail-fast: false
1314
matrix:
1415
include:
15-
- shell: powershell
16-
name: WindowsPowerShell
17-
- shell: pwsh
18-
name: PowerShell
16+
- name: Windows PowerShell 5.1
17+
ps_exe: powershell
18+
- name: PowerShell 7
19+
ps_exe: pwsh
1920

2021
steps:
2122
- uses: actions/checkout@v4
2223

2324
- name: Show PowerShell Version
24-
shell: ${{ matrix.shell }}
25-
run: $PSVersionTable | Format-List
25+
shell: pwsh
26+
run: |
27+
$exe = '${{ matrix.ps_exe }}'
28+
& $exe -NoProfile -Command '$PSVersionTable | Format-List'
2629
2730
- name: Install Dependencies
28-
shell: ${{ matrix.shell }}
31+
shell: pwsh
2932
run: |
33+
$exe = '${{ matrix.ps_exe }}'
34+
$installScript = @'
3035
if (-not (Get-PackageProvider -Name NuGet -ErrorAction SilentlyContinue)) {
3136
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Scope CurrentUser -Force
3237
}
@@ -35,8 +40,11 @@ jobs:
3540
Install-Module Pester -Scope CurrentUser -RequiredVersion 5.7.1 -Force
3641
Install-Module posh-git -Scope CurrentUser -Force
3742
Install-Module git-aliases -Scope CurrentUser -Force
43+
'@
44+
& $exe -NoProfile -Command $installScript
3845
3946
- name: Run Lint and Tests
40-
shell: ${{ matrix.shell }}
47+
shell: pwsh
4148
run: |
42-
.\tools\ci.ps1
49+
$exe = '${{ matrix.ps_exe }}'
50+
& $exe -NoProfile -File .\tools\ci.ps1

0 commit comments

Comments
 (0)