-
Notifications
You must be signed in to change notification settings - Fork 27
230 lines (226 loc) · 6.1 KB
/
ci.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: CI
# This workflow is triggered on any golang code, makefile, workflow changes to repository.
on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
jobs:
code-check:
name: Code Check
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: true
matrix:
os: [ubuntu18.04]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Cache Go Mod Pkg
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Code Check
run: |
make code-check
unit-test:
name: Unit Test
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Cache Go Mod Pkg
uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Cache TestBin
uses: actions/cache@v2
with:
path: testbin
key: ubuntu${{ matrix.ubuntu }}-testbin
restore-keys: ubuntu${{ matrix.ubuntu }}-testbin
- name: Kubernetes KinD Cluster
uses: container-tools/kind-action@v1
- name: Unit Test
run: |
make go-generate
make test-only
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: ./cover.out
name: ubuntu-${{ matrix.ubuntu }}-unittests
sit:
name: System Integration Test
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Free Up Disk Space
run:
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /usr/local/share/boost /opt/ghc
- name: Maximize build space
uses: easimon/maximize-build-space@v7
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Prepare Docker Images
run: |
make sit-prepare-images
- name: Setup KinD Cluster
uses: engineerd/[email protected]
with:
version: "v0.11.1"
- name: Deploy to KinD
run: |
make sit-deploy
- name: Integration Test
run: |
make sit-test
sit-mixture:
name: System Integration Test for Mixture
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Free Up Disk Space
run:
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /usr/local/share/boost /opt/ghc
- name: Maximize build space
uses: easimon/maximize-build-space@v7
with:
root-reserve-mb: 20480
swap-size-mb: 1024
remove-dotnet: 'true'
- name: Checkout
uses: actions/checkout@v2
- name: Prepare Docker Images
run: |
make sit-prepare-images
- name: Setup KinD Cluster
uses: engineerd/[email protected]
with:
version: "v0.11.1"
- name: Deploy to KinD
run: |
make sit-deploy
- name: Integration Test
run: |
make sit-test test_mode=mixture
sit-new-feature:
name: System Integration Test for New Feature
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Free Up Disk Space
run:
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /usr/local/share/boost /opt/ghc
- name: Checkout
uses: actions/checkout@v2
- name: Prepare Docker Images
run: |
make sit-prepare-images
- name: Setup KinD Cluster
uses: container-tools/kind-action@v1
with:
version: "v0.18.0"
kubectl_version: "v1.24.0"
- name: Deploy to KinD
run: |
make sit-deploy
- name: Test NewFeature
run: |
make sit-test test_mode=feature
sit-milvus-upgrade:
name: System Integration Test for Milvus Upgrade
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Free Up Disk Space
run:
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /usr/local/share/boost /opt/ghc
- name: Checkout
uses: actions/checkout@v2
- name: Prepare Docker Images
run: |
make sit-prepare-images
- name: Setup KinD Cluster
uses: engineerd/[email protected]
with:
version: "v0.11.1"
- name: Deploy to KinD
run: |
make sit-deploy
- name: Test Upgrade
run: |
make test-milvus-upgrade
sit-upgrade:
name: System Integration Test for Upgrade
runs-on: ubuntu-latest
timeout-minutes: 40
strategy:
fail-fast: false
matrix:
os: [ubuntu18.04]
steps:
- name: Free Up Disk Space
run:
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /usr/local/share/boost /opt/ghc
- name: Checkout
uses: actions/checkout@v2
- name: Setup KinD Cluster
uses: engineerd/[email protected]
with:
version: "v0.11.1"
- name: Prepare Docker Images
run: |
make sit-prepare-images
make sit-load-images
- name: Test Upgrade
run: |
make test-upgrade