4
4
integration_tests :
5
5
strategy :
6
6
matrix :
7
- go : ['1.20 ']
7
+ go : ['1.22 ']
8
8
platform : [windows-latest]
9
9
runs-on : ${{ matrix.platform }}
10
10
steps :
@@ -15,27 +15,43 @@ jobs:
15
15
- name : Checkout code
16
16
uses : actions/checkout@v4
17
17
- name : Build
18
+ shell : powershell
18
19
run : |
19
20
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
20
21
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
21
22
- name : Run Windows Integration Tests
23
+ shell : powershell
22
24
run : |
23
- # required for running Volume and Disk tests
25
+ # This scripts reimplements scripts/run-integration.sh in powershell.
26
+
27
+ # Nested virtualization is required for running Volume and Disk tests
24
28
Install-WindowsFeature -name Hyper-V-PowerShell
25
-
26
- # start the CSI Proxy before running tests on windows
27
- Start-Job -Name CSIProxy -ScriptBlock {
28
- .\bin\csi-proxy.exe
29
- };
30
- Start-Sleep -Seconds 30;
31
- Write-Output "getting named pipes"
29
+
30
+ # copy the binary from the user directory
31
+ New-Item -ItemType Directory -Path C:\etc\kubernetes\node\bin -Force
32
+ New-Item -ItemType Directory -Path C:\etc\kubernetes\logs -Force
33
+ Copy-Item -Path .\bin\csi-proxy.exe -Destination "C:\etc\kubernetes\node\bin\csi-proxy.exe"
34
+
35
+ # restart the csiproxy service
36
+ $flags = "-v=5 -windows-service -log_file=C:\etc\kubernetes\logs\csi-proxy.log -logtostderr=false"
37
+ sc.exe create csiproxy start= "auto" binPath= "C:\etc\kubernetes\node\bin\csi-proxy.exe $flags"
38
+ sc.exe failure csiproxy reset= 0 actions= restart/10000
39
+ sc.exe start csiproxy
40
+
41
+ Start-Sleep -Seconds 5;
42
+
43
+ Write-Output "Checking the status of csi-proxy"
44
+ sc.exe query csiproxy
32
45
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
46
+ Write-Output "Get CSI Proxy logs"
47
+ Get-Content C:\etc\kubernetes\logs\csi-proxy.log -Tail 20
48
+
33
49
$env:CSI_PROXY_GH_ACTIONS="TRUE"
34
50
go test -timeout 20m -v -race ./integrationtests/...
35
51
unit_tests :
36
52
strategy :
37
53
matrix :
38
- go : ['1.20 ']
54
+ go : ['1.22 ']
39
55
platform : [windows-latest]
40
56
runs-on : ${{ matrix.platform }}
41
57
steps :
53
69
bump_version_test :
54
70
strategy :
55
71
matrix :
56
- go : ['1.20 ']
72
+ go : ['1.22 ']
57
73
platform : [ubuntu-latest]
58
74
runs-on : ${{ matrix.platform }}
59
75
steps :
0 commit comments