8
8
- " docs/**"
9
9
- " **.md"
10
10
- " scripts/cleanup/**"
11
+ - " CODEOWNERS"
12
+ - " OWNERS"
11
13
pull_request :
12
14
branches :
13
15
- main
16
18
- " docs/**"
17
19
- " **.md"
18
20
- " scripts/cleanup/**"
21
+ - " CODEOWNERS"
22
+ - " OWNERS"
19
23
env :
20
24
CI_WAIT_FOR_OK_SECONDS : 60
21
25
CI_MAX_ITERATIONS_THRESHOLD : 60
@@ -40,10 +44,11 @@ jobs:
40
44
steps :
41
45
- name : Checkout
42
46
uses : actions/checkout@v2
43
- - name : Setup Go 1.17
44
- uses : actions/setup-go@v2
47
+ - name : Setup Go
48
+ uses : actions/setup-go@v3
45
49
with :
46
- go-version : 1.17
50
+ go-version-file : go.mod
51
+ cache : true
47
52
- name : go build deps
48
53
run : make embed-files-test
49
54
- name : golangci-lint
@@ -58,10 +63,11 @@ jobs:
58
63
steps :
59
64
- name : Checkout
60
65
uses : actions/checkout@v2
61
- - name : Setup Go 1.17
62
- uses : actions/setup-go@v2
66
+ - name : Setup Go
67
+ uses : actions/setup-go@v3
63
68
with :
64
- go-version : 1.17
69
+ go-version-file : go.mod
70
+ cache : true
65
71
- name : go mod tidy
66
72
run : make go-mod-tidy
67
73
- name : Codegen checks
@@ -73,10 +79,11 @@ jobs:
73
79
steps :
74
80
- name : Checkout
75
81
uses : actions/checkout@v2
76
- - name : Setup Go 1.17
77
- uses : actions/setup-go@v2
82
+ - name : Setup Go
83
+ uses : actions/setup-go@v3
78
84
with :
79
- go-version : 1.17
85
+ go-version-file : go.mod
86
+ cache : true
80
87
- name : go mod tidy
81
88
run : make go-mod-tidy
82
89
- name : gomock checks
@@ -97,22 +104,11 @@ jobs:
97
104
steps :
98
105
- name : Checkout
99
106
uses : actions/checkout@v2
100
- - name : Restore Module Cache
101
- uses : actions/cache@v2
107
+ - name : Setup Go
108
+ uses : actions/setup-go@v3
102
109
with :
103
- path : ~/go/pkg/mod
104
- key : ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
105
- restore-keys : |
106
- ${{ runner.os }}-gomod2-
107
- - name : Restore Build Cache
108
- uses : actions/cache@v2
109
- with :
110
- path : ~/.cache/go-build
111
- key : ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
112
- - name : Setup Go 1.17
113
- uses : actions/setup-go@v2
114
- with :
115
- go-version : 1.17
110
+ go-version-file : go.mod
111
+ cache : true
116
112
- name : Go Build
117
113
run : make build-ci
118
114
@@ -123,22 +119,11 @@ jobs:
123
119
steps :
124
120
- name : Checkout
125
121
uses : actions/checkout@v2
126
- - name : Restore Module Cache
127
- uses : actions/cache@v2
128
- with :
129
- path : ~/go/pkg/mod
130
- key : ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
131
- restore-keys : |
132
- ${{ runner.os }}-gomod2-
133
- - name : Restore Build Cache
134
- uses : actions/cache@v2
122
+ - name : Setup Go
123
+ uses : actions/setup-go@v3
135
124
with :
136
- path : ~/.cache/go-build
137
- key : ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
138
- - name : Setup Go 1.17
139
- uses : actions/setup-go@v2
140
- with :
141
- go-version : 1.17
125
+ go-version-file : go.mod
126
+ cache : true
142
127
- name : go mod tidy
143
128
run : make go-mod-tidy
144
129
- name : Test
@@ -149,35 +134,6 @@ jobs:
149
134
with :
150
135
flags : unittests
151
136
152
- scenarios_tests :
153
- name : Test various Envoy + SMI configuration scenarios
154
- runs-on : ubuntu-latest
155
- needs : build
156
- steps :
157
- - name : Checkout
158
- uses : actions/checkout@v2
159
- - name : Restore Module Cache
160
- uses : actions/cache@v2
161
- with :
162
- path : ~/go/pkg/mod
163
- key : ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
164
- restore-keys : |
165
- ${{ runner.os }}-gomod2-
166
- - name : Restore Build Cache
167
- uses : actions/cache@v2
168
- with :
169
- path : ~/.cache/go-build
170
- key : ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
171
- - name : Setup Go 1.17
172
- uses : actions/setup-go@v2
173
- with :
174
- go-version : 1.17
175
- - name : Test
176
- run : |
177
- touch .env
178
- make kind-up
179
- go test -v ./tests/scenarios/...
180
-
181
137
imagescan :
182
138
name : Scan images for security vulnerabilities
183
139
runs-on : ubuntu-latest
@@ -202,73 +158,59 @@ jobs:
202
158
needs : build
203
159
strategy :
204
160
matrix :
161
+ k8s_version : [""]
162
+ focus : [""]
205
163
bucket : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
164
+ include :
165
+ - k8s_version : v1.22.9
166
+ focus : " Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
167
+ bucket : " .*"
168
+ - k8s_version : v1.23.6
169
+ focus : " Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
170
+ bucket : " .*"
171
+ - k8s_version : v1.24.1
172
+ focus : " Test traffic flowing from client to server with a Kubernetes Service for the Source: HTTP"
173
+ bucket : " .*"
206
174
env :
207
175
CTR_TAG : ${{ github.sha }}
208
176
CTR_REGISTRY : " localhost:5000" # unused for kind, but currently required in framework
209
177
steps :
210
178
- name : Checkout
211
179
uses : actions/checkout@v2
212
- - name : Restore Module Cache
213
- uses : actions/cache@v2
214
- with :
215
- path : ~/go/pkg/mod
216
- key : ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
217
- restore-keys : |
218
- ${{ runner.os }}-gomod2-
219
- - name : Restore Build Cache
220
- uses : actions/cache@v2
180
+ - name : Setup Go
181
+ uses : actions/setup-go@v3
221
182
with :
222
- path : ~/.cache/go-build
223
- key : ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
224
- - name : Setup Go 1.17
225
- uses : actions/setup-go@v2
226
- with :
227
- go-version : 1.17
183
+ go-version-file : go.mod
184
+ cache : true
228
185
- name : Build test dependencies
229
186
env :
230
187
DOCKER_BUILDX_OUTPUT : type=docker
231
188
run : make docker-build-osm build-osm docker-build-tcp-echo-server
232
- # PR Tests
233
- - name : Run PR tests
234
- id : pr_test
235
- if : ${{ github.event_name == 'pull_request' }}
189
+ - name : Run tests
190
+ id : test
236
191
env :
237
192
K8S_NAMESPACE : " osm-system"
238
- run : go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
193
+ run : go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -kindClusterVersion='${{ matrix.k8s_version }}' - test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\].*${{ matrix.focus }} '
239
194
continue-on-error : true
240
- - name : Upload PR test logs
241
- if : ${{ steps.pr_test.conclusion != 'skipped' }}
242
- uses : actions/upload-artifact@v2
243
- with :
244
- name : pr_test_logs_bucket_${{ matrix.bucket }}
245
- path : /tmp/test**/*
246
- - name : Check continue PR tests
247
- if : ${{ steps.pr_test.conclusion != 'skipped' && steps.pr_test.outcome == 'failure'}}
248
- run : exit 1
249
- - name : Clean PR tests
250
- if : ${{ steps.pr_test.conclusion != 'skipped' }}
251
- run : rm -rf /tmp/test*
252
-
253
- # Push Tests
254
- - name : Run Push tests
255
- id : push_test
256
- if : ${{ github.event_name == 'push' }}
257
- env :
258
- K8S_NAMESPACE : " osm-system"
259
- run : go test ./tests/e2e -test.v -ginkgo.v -ginkgo.progress -installType=KindCluster -test.timeout 0 -test.failfast -ginkgo.failFast -ginkgo.focus='\[Bucket ${{ matrix.bucket }}\]'
260
- continue-on-error : true
261
- - name : Upload Push test logs
262
- if : ${{ steps.push_test.conclusion != 'skipped' }}
195
+ - name : Set Logs name
196
+ if : ${{ steps.test.conclusion != 'skipped' }}
197
+ run : |
198
+ if [[ -n "${{ matrix.k8s_version }}" ]]; then
199
+ echo "ARTIFACT_NAME=test_logs_k8s_version_${{ matrix.k8s_version }}" >> $GITHUB_ENV
200
+ else
201
+ echo "ARTIFACT_NAME=test_logs_bucket_${{ matrix.bucket }}" >> $GITHUB_ENV
202
+ fi
203
+ - name : Upload test logs
204
+ if : ${{ steps.test.conclusion != 'skipped' }}
263
205
uses : actions/upload-artifact@v2
264
206
with :
265
- name : push_test_logs_bucket_ ${{ matrix.bucket }}
207
+ name : ${{ env.ARTIFACT_NAME }}
266
208
path : /tmp/test**/*
267
- - name : Check continue Push tests
268
- if : ${{ steps.push_test .conclusion != 'skipped' && steps.push_test .outcome == 'failure'}}
209
+ - name : Check continue tests
210
+ if : ${{ steps.test .conclusion != 'skipped' && steps.test .outcome == 'failure'}}
269
211
run : exit 1
270
- - name : Clean Push tests logs
271
- if : ${{ steps.push_test .conclusion != 'skipped' }}
212
+ - name : Clean tests
213
+ if : ${{ steps.test .conclusion != 'skipped' }}
272
214
run : rm -rf /tmp/test*
273
215
274
216
integration-tresor :
@@ -278,34 +220,19 @@ jobs:
278
220
steps :
279
221
- name : Checkout
280
222
uses : actions/checkout@v2
281
-
282
- - name : Restore Module Cache
283
- uses : actions/cache@v2
284
- with :
285
- path : ~/go/pkg/mod
286
- key : ${{ runner.os }}-gomod2-${{ hashFiles('**/go.sum') }}
287
- restore-keys : |
288
- ${{ runner.os }}-gomod2-
289
-
290
- - name : Restore Build Cache
291
- uses : actions/cache@v2
292
- with :
293
- path : ~/.cache/go-build
294
- key : ${{ runner.os }}-gobuild-${{ hashFiles('**/*.go') }}
295
-
296
- - name : Setup Go 1.17
297
- uses : actions/setup-go@v2
223
+ - name : Setup Go
224
+ uses : actions/setup-go@v3
298
225
with :
299
- go-version : 1.17
300
- id : go
301
-
226
+ go-version-file : go.mod
227
+ cache : true
302
228
- name : Run Simulation w/ Tresor, SMI policies, egress disabled and reconciler disabled
303
229
env :
304
230
CERT_MANAGER : " tresor"
305
231
BOOKSTORE_SVC : " bookstore"
306
232
BOOKTHIEF_EXPECTED_RESPONSE_CODE : " 0"
307
233
ENABLE_EGRESS : " false"
308
234
ENABLE_RECONCILER : " false"
235
+ PERMISSIVE_MODE : " false"
309
236
DEPLOY_TRAFFIC_SPLIT : " true"
310
237
CTR_TAG : ${{ github.sha }}
311
238
USE_PRIVATE_REGISTRY : " false"
0 commit comments