@@ -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 :
@@ -427,16 +480,20 @@ jobs:
427
480
428
481
kube-ovn-ic-conformance-e2e :
429
482
name : Kube-OVN IC Conformance E2E
430
- needs : build-kube-ovn
483
+ needs :
484
+ - build-kube-ovn
485
+ - build-e2e-binaries
431
486
runs-on : ubuntu-22.04
432
487
timeout-minutes : 30
433
488
steps :
434
489
- uses : actions/checkout@v3
435
490
436
491
- name : Create the default branch directory
492
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
437
493
run : mkdir -p test/e2e/source
438
494
439
495
- name : Check out the default branch
496
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
440
497
uses : actions/checkout@v3
441
498
with :
442
499
ref : ${{ github.event.repository.default_branch }}
@@ -460,18 +517,14 @@ jobs:
460
517
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
461
518
462
519
- name : Go cache
463
- uses : actions/cache@v3
520
+ uses : actions/cache/restore @v3
464
521
with :
465
522
path : |
466
523
~/.cache/go-build
467
524
~/go/pkg/mod
468
525
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
469
526
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
470
527
471
- - name : Build e2e binaries
472
- working-directory : ${{ env.E2E_DIR }}
473
- run : make e2e-compile
474
-
475
528
- name : Install kind
476
529
uses : helm/kind-action@v1
477
530
with :
@@ -720,7 +773,9 @@ jobs:
720
773
721
774
cilium-chaining-e2e :
722
775
name : Cilium Chaining E2E
723
- needs : build-kube-ovn
776
+ needs :
777
+ - build-kube-ovn
778
+ - build-e2e-binaries
724
779
runs-on : ubuntu-22.04
725
780
timeout-minutes : 30
726
781
steps :
@@ -730,9 +785,11 @@ jobs:
730
785
version : ' ${{ env.HELM_VERSION }}'
731
786
732
787
- name : Create the default branch directory
788
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
733
789
run : mkdir -p test/e2e/source
734
790
735
791
- name : Check out the default branch
792
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
736
793
uses : actions/checkout@v3
737
794
with :
738
795
ref : ${{ github.event.repository.default_branch }}
@@ -761,18 +818,14 @@ jobs:
761
818
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
762
819
763
820
- name : Go cache
764
- uses : actions/cache@v3
821
+ uses : actions/cache/restore @v3
765
822
with :
766
823
path : |
767
824
~/.cache/go-build
768
825
~/go/pkg/mod
769
826
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
770
827
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
771
828
772
- - name : Build e2e binaries
773
- working-directory : ${{ env.E2E_DIR }}
774
- run : make e2e-compile
775
-
776
829
- name : Install kind
777
830
uses : helm/kind-action@v1
778
831
with :
@@ -806,7 +859,9 @@ jobs:
806
859
807
860
kube-ovn-security-e2e :
808
861
name : Kube-OVN Security E2E
809
- needs : build-kube-ovn
862
+ needs :
863
+ - build-kube-ovn
864
+ - build-e2e-binaries
810
865
runs-on : ubuntu-22.04
811
866
timeout-minutes : 30
812
867
strategy :
@@ -826,9 +881,11 @@ jobs:
826
881
- uses : actions/checkout@v3
827
882
828
883
- name : Create the default branch directory
884
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
829
885
run : mkdir -p test/e2e/source
830
886
831
887
- name : Check out the default branch
888
+ if : github.base_ref == github.event.repository.default_branch || github.ref_name == github.event.repository.default_branch
832
889
uses : actions/checkout@v3
833
890
with :
834
891
ref : ${{ github.event.repository.default_branch }}
@@ -852,18 +909,14 @@ jobs:
852
909
run : echo "GO_FULL_VER=$(go version | awk '{print $3}')" >> "$GITHUB_ENV"
853
910
854
911
- name : Go cache
855
- uses : actions/cache@v3
912
+ uses : actions/cache/restore @v3
856
913
with :
857
914
path : |
858
915
~/.cache/go-build
859
916
~/go/pkg/mod
860
917
key : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-${{ hashFiles(format('{0}/**/go.sum', env.E2E_DIR)) }}
861
918
restore-keys : ${{ runner.os }}-e2e-${{ env.GO_FULL_VER }}-x86-
862
919
863
- - name : Build e2e binaries
864
- working-directory : ${{ env.E2E_DIR }}
865
- run : make e2e-compile
866
-
867
920
- name : Install kind
868
921
uses : helm/kind-action@v1
869
922
with :
0 commit comments