generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 61
84 lines (82 loc) · 2.78 KB
/
windows.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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Windows Tests
on: [push, pull_request]
jobs:
integration_tests:
strategy:
matrix:
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: |
go build -v -a -o ./bin/csi-proxy.exe ./cmd/csi-proxy
go build -v -a -o ./bin/csi-proxy-api-gen.exe ./cmd/csi-proxy-api-gen
- name: Run Windows Integration Tests
run: |
# required for running Volume and Disk tests
Install-WindowsFeature -name Hyper-V-PowerShell
# start the CSI Proxy before running tests on windows
Start-Job -Name CSIProxy -ScriptBlock {
.\bin\csi-proxy.exe
};
Start-Sleep -Seconds 30;
Write-Output "getting named pipes"
[System.IO.Directory]::GetFiles("\\.\\pipe\\")
$env:CSI_PROXY_GH_ACTIONS="TRUE"
go test -timeout 20m -v -race ./integrationtests/...
unit_tests:
strategy:
matrix:
go: ['1.22']
platform: [windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Checkout code
uses: actions/checkout@v4
- name: Run Windows Unit Tests
run: |
make all
go test -v -race ./pkg/...
bump_version_test:
strategy:
matrix:
go: ['1.22']
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install Tools
run: |
echo "${HOME}/.local/bin" >> $GITHUB_PATH
echo "/home/runner/work/csi-proxy/csi-proxy/go/bin" >> $GITHUB_PATH
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v3.15.8/protoc-3.15.8-linux-x86_64.zip
unzip protoc-3.15.8-linux-x86_64.zip -d $HOME/.local
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1
path: go/src/github.com/kubernetes-csi/csi-proxy
- name: Run bump version script
env:
GOPATH: /home/runner/work/csi-proxy/csi-proxy/go
GOBIN: /home/runner/work/csi-proxy/csi-proxy/go/bin
run: |
go install github.com/golang/protobuf/protoc-gen-go@v1.5.3
protoc --version
cd /home/runner/work/csi-proxy/csi-proxy/go/src/github.com/kubernetes-csi/csi-proxy
API_GROUP=filesystem OLD_API_VERSION=v1beta2 NEW_API_VERSION=v99 scripts/bump-version.sh