Skip to content

Commit 3b62fa5

Browse files
committed
Import PS Security module 3.0 before running a PS function
1 parent 07be14d commit 3b62fa5

File tree

1 file changed

+24
-4
lines changed

1 file changed

+24
-4
lines changed

.github/workflows/windows.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,27 @@
11
name: Windows Tests
22
on: [push, pull_request]
33
jobs:
4+
setup_powershell:
5+
strategy:
6+
matrix:
7+
go: ['1.22']
8+
platform: [windows-latest]
9+
runs-on: ${{ matrix.platform }}
10+
steps:
11+
- name: Run Windows Integration Tests
12+
run: |
13+
# required for running Volume and Disk tests
14+
Install-WindowsFeature -name Hyper-V-PowerShell
15+
# required for SMB test
16+
# Get-PSRepository
17+
# Set-PSRepository PSGallery -InstallationPolicy Trusted
18+
Install-Module -Name SecMgmt -AllowClobber
19+
$secured='random text'|ConvertTo-SecureString -AsPlainText -Force;$secured;
20+
421
integration_tests:
522
strategy:
623
matrix:
7-
go: ['1.20']
24+
go: ['1.22']
825
platform: [windows-latest]
926
runs-on: ${{ matrix.platform }}
1027
steps:
@@ -22,7 +39,9 @@ jobs:
2239
run: |
2340
# required for running Volume and Disk tests
2441
Install-WindowsFeature -name Hyper-V-PowerShell
25-
42+
# required for SMB test
43+
Install-Module -Name SecMgmt -AllowClobber
44+
2645
# start the CSI Proxy before running tests on windows
2746
Start-Job -Name CSIProxy -ScriptBlock {
2847
.\bin\csi-proxy.exe
@@ -31,11 +50,12 @@ jobs:
3150
Write-Output "getting named pipes"
3251
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
3352
$env:CSI_PROXY_GH_ACTIONS="TRUE"
53+
3454
go test -timeout 20m -v -race ./integrationtests/...
3555
unit_tests:
3656
strategy:
3757
matrix:
38-
go: ['1.20']
58+
go: ['1.22']
3959
platform: [windows-latest]
4060
runs-on: ${{ matrix.platform }}
4161
steps:
@@ -53,7 +73,7 @@ jobs:
5373
bump_version_test:
5474
strategy:
5575
matrix:
56-
go: ['1.20']
76+
go: ['1.22']
5777
platform: [ubuntu-latest]
5878
runs-on: ${{ matrix.platform }}
5979
steps:

0 commit comments

Comments
 (0)