@@ -26,8 +26,8 @@ concurrency:
26
26
cancel-in-progress : true
27
27
28
28
env :
29
- GOSEC_VERSION : ' 2.14 .0'
30
- HELM_VERSION : v3.10.1
29
+ GOSEC_VERSION : ' 2.15 .0'
30
+ HELM_VERSION : v3.10.3
31
31
32
32
jobs :
33
33
build-kube-ovn :
60
60
61
61
- name : Install gosec
62
62
run : |
63
- curl -sfL https://raw.githubusercontent.com/securego/gosec/master/install.sh | sh -s -- -b $(go env GOPATH)/bin 'v${{ env.GOSEC_VERSION }}'
63
+ tmp=$(mktemp -d)
64
+ archive="gosec_${{ env.GOSEC_VERSION }}_$(go env GOHOSTOS)_$(go env GOHOSTARCH).tar.gz"
65
+ wget -q -O "$tmp/$archive" https://github.com/securego/gosec/releases/download/v${{ env.GOSEC_VERSION }}/$archive
66
+ tar --no-same-owner -C "$tmp" -xzf "$tmp/$archive"
67
+ install "$tmp/gosec" /usr/local/bin
68
+ rm -rf $tmp
64
69
65
70
- name : Build
66
71
run : |
93
98
name : vpc-nat-gateway
94
99
path : vpc-nat-gateway.tar
95
100
101
+ build-e2e-binaries :
102
+ name : Build E2E Binaries
103
+ runs-on : ubuntu-22.04
104
+ timeout-minutes : 15
105
+ steps :
106
+ - uses : actions/checkout@v3
107
+
108
+ - name : Create the default branch directory
109
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
110
+ run : mkdir -p test/e2e/source
111
+
112
+ - name : Check out the default branch
113
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
114
+ uses : actions/checkout@v3
115
+ with :
116
+ ref : ${{ github.event.repository.default_branch }}
117
+ fetch-depth : 1
118
+ path : test/e2e/source
119
+
120
+ - name : Export E2E directory
121
+ run : |
122
+ if [ '${{ github.base_ref || github.ref_name }}' = '${{ github.event.repository.default_branch }}' ]; then
123
+ echo "E2E_DIR=." >> "$GITHUB_ENV"
124
+ else
125
+ echo "E2E_DIR=test/e2e/source" >> "$GITHUB_ENV"
126
+ fi
127
+
128
+ - uses : actions/setup-go@v3
129
+ with :
130
+ go-version-file : ${{ env.E2E_DIR }}/go.mod
131
+ check-latest : true
132
+
133
+ - name : Export Go full version
134
+ run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
135
+
136
+ - name : Go cache
137
+ uses : actions/cache@v3
138
+ with :
139
+ path : |
140
+ ~/.cache/go-build
141
+ ~/go/pkg/mod
142
+ key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
143
+ restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
144
+
145
+ - run : make e2e-compile
146
+
96
147
k8s-conformance-e2e :
97
148
name : Kubernetes Conformance E2E
98
- needs : build-kube-ovn
149
+ needs :
150
+ - build-kube-ovn
151
+ - build-e2e-binaries
99
152
runs-on : ubuntu-22.04
100
153
timeout-minutes : 60
101
154
strategy :
@@ -112,9 +165,11 @@ jobs:
112
165
- uses : actions/checkout@v3
113
166
114
167
- name : Create the default branch directory
168
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
115
169
run : mkdir -p test/e2e/source
116
170
117
171
- name : Check out the default branch
172
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
118
173
uses : actions/checkout@v3
119
174
with :
120
175
ref : ${{ github.event.repository.default_branch }}
@@ -143,18 +198,14 @@ jobs:
143
198
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
144
199
145
200
- name : Go cache
146
- uses : actions/cache@v3
201
+ uses : actions/cache/restore @v3
147
202
with :
148
203
path : |
149
204
~/.cache/go-build
150
205
~/go/pkg/mod
151
- key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86- ${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
206
+ key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
152
207
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
153
208
154
- - name : Build e2e binaries
155
- working-directory : ${{ env.E2E_DIR }}
156
- run : make e2e-compile
157
-
158
209
- name : Install kind
159
210
uses : helm/kind-action@v1
160
211
with :
@@ -190,7 +241,9 @@ jobs:
190
241
k8s-netpol-e2e :
191
242
name : Kubernetes Network Policy E2E
192
243
if : github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'network policy')
193
- needs : build-kube-ovn
244
+ needs :
245
+ - build-kube-ovn
246
+ - build-e2e-binaries
194
247
runs-on : ubuntu-22.04
195
248
timeout-minutes : 60
196
249
strategy :
@@ -204,9 +257,11 @@ jobs:
204
257
- uses : actions/checkout@v3
205
258
206
259
- name : Create the default branch directory
260
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
207
261
run : mkdir -p test/e2e/source
208
262
209
263
- name : Check out the default branch
264
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
210
265
uses : actions/checkout@v3
211
266
with :
212
267
ref : ${{ github.event.repository.default_branch }}
@@ -235,18 +290,14 @@ jobs:
235
290
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
236
291
237
292
- name : Go cache
238
- uses : actions/cache@v3
293
+ uses : actions/cache/restore @v3
239
294
with :
240
295
path : |
241
296
~/.cache/go-build
242
297
~/go/pkg/mod
243
298
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
244
299
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
245
300
246
- - name : Build e2e binaries
247
- working-directory : ${{ env.E2E_DIR }}
248
- run : make e2e-compile
249
-
250
301
- name : Install kind
251
302
uses : helm/kind-action@v1
252
303
with :
@@ -292,9 +343,11 @@ jobs:
292
343
- uses : actions/checkout@v3
293
344
294
345
- name : Create the default branch directory
346
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
295
347
run : mkdir -p test/e2e/source
296
348
297
349
- name : Check out the default branch
350
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
298
351
uses : actions/checkout@v3
299
352
with :
300
353
ref : ${{ github.event.repository.default_branch }}
@@ -339,7 +392,9 @@ jobs:
339
392
340
393
kube-ovn-conformance-e2e :
341
394
name : Kube-OVN Conformance E2E
342
- needs : build-kube-ovn
395
+ needs :
396
+ - build-kube-ovn
397
+ - build-e2e-binaries
343
398
runs-on : ubuntu-22.04
344
399
timeout-minutes : 30
345
400
strategy :
@@ -353,9 +408,11 @@ jobs:
353
408
- uses : actions/checkout@v3
354
409
355
410
- name : Create the default branch directory
411
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
356
412
run : mkdir -p test/e2e/source
357
413
358
414
- name : Check out the default branch
415
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
359
416
uses : actions/checkout@v3
360
417
with :
361
418
ref : ${{ github.event.repository.default_branch }}
@@ -379,18 +436,14 @@ jobs:
379
436
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
380
437
381
438
- name : Go cache
382
- uses : actions/cache@v3
439
+ uses : actions/cache/restore @v3
383
440
with :
384
441
path : |
385
442
~/.cache/go-build
386
443
~/go/pkg/mod
387
444
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
388
445
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
389
446
390
- - name : Build e2e binaries
391
- working-directory : ${{ env.E2E_DIR }}
392
- run : make e2e-compile
393
-
394
447
- name : Install kind
395
448
uses : helm/kind-action@v1
396
449
with :
@@ -570,8 +623,10 @@ jobs:
570
623
run : sh dist/images/cleanup.sh
571
624
572
625
cilium-chaining-e2e :
573
- needs : build-kube-ovn
574
626
name : Cilium Chaining E2E
627
+ needs :
628
+ - build-kube-ovn
629
+ - build-e2e-binaries
575
630
runs-on : ubuntu-22.04
576
631
timeout-minutes : 30
577
632
steps :
@@ -581,9 +636,11 @@ jobs:
581
636
version : ' ${{ env.HELM_VERSION }}'
582
637
583
638
- name : Create the default branch directory
639
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
584
640
run : mkdir -p test/e2e/source
585
641
586
642
- name : Check out the default branch
643
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
587
644
uses : actions/checkout@v3
588
645
with :
589
646
ref : ${{ github.event.repository.default_branch }}
@@ -612,18 +669,14 @@ jobs:
612
669
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
613
670
614
671
- name : Go cache
615
- uses : actions/cache@v3
672
+ uses : actions/cache/restore @v3
616
673
with :
617
674
path : |
618
675
~/.cache/go-build
619
676
~/go/pkg/mod
620
677
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
621
678
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
622
679
623
- - name : Build e2e binaries
624
- working-directory : ${{ env.E2E_DIR }}
625
- run : make e2e-compile
626
-
627
680
- name : Install kind
628
681
uses : helm/kind-action@v1
629
682
with :
0 commit comments