1
1
name : CI
2
2
on : [pull_request]
3
+ env :
4
+ GOPROXY : https://proxy.golang.org
3
5
jobs :
4
6
# Runs before all other jobs
5
- # builds the minikube binaries
7
+ # builds the minikube binaries
6
8
build_minikube :
7
9
env :
8
10
TIME_ELAPSED : time
11
13
runs-on : ubuntu-18.04
12
14
steps :
13
15
- uses : actions/checkout@v2
14
- - name : build binaries
16
+ - name : Download Dependencies
17
+ run : go mod download
18
+ - name : Build Binaries
15
19
run : |
16
20
make minikube-linux-amd64
17
21
make e2e-linux-amd64
@@ -36,11 +40,13 @@ jobs:
36
40
runs-on : ubuntu-18.04
37
41
steps :
38
42
- uses : actions/checkout@v2
39
- - name : install libvirt
40
- run : |
43
+ - name : Install libvirt
44
+ run : |
41
45
sudo apt-get update
42
46
sudo apt-get install -y libvirt-dev
43
- - name : lint
47
+ - name : Download Dependencies
48
+ run : go mod download
49
+ - name : Lint
44
50
env :
45
51
TESTSUITE : lintall
46
52
run : make test
@@ -53,11 +59,13 @@ jobs:
53
59
runs-on : ubuntu-18.04
54
60
steps :
55
61
- uses : actions/checkout@v2
56
- - name : install libvirt
57
- run : |
62
+ - name : Install libvirt
63
+ run : |
58
64
sudo apt-get update
59
65
sudo apt-get install -y libvirt-dev
60
- - name : unit test
66
+ - name : Download Dependencies
67
+ run : go mod download
68
+ - name : Unit Test
61
69
env :
62
70
TESTSUITE : unittest
63
71
run :
@@ -85,11 +93,11 @@ jobs:
85
93
run : |
86
94
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
87
95
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
88
- - name : Download binaries
96
+ - name : Download Binaries
89
97
uses : actions/download-artifact@v1
90
98
with :
91
99
name : minikube_binaries
92
- - name : Run integration test
100
+ - name : Run Integration Test
93
101
continue-on-error : true
94
102
# bash {0} to allow test to continue to next step. in case of
95
103
shell : bash {0}
@@ -107,7 +115,7 @@ jobs:
107
115
sec=$((${TIME_ELAPSED}%60))
108
116
TIME_ELAPSED="${min} min $sec seconds "
109
117
echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
110
- - name : Generate html report
118
+ - name : Generate HTML Report
111
119
shell : bash
112
120
run : |
113
121
cd minikube_binaries
@@ -153,11 +161,11 @@ jobs:
153
161
run : |
154
162
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
155
163
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
156
- - name : Download binaries
164
+ - name : Download Binaries
157
165
uses : actions/download-artifact@v1
158
166
with :
159
167
name : minikube_binaries
160
- - name : Run integration test
168
+ - name : Run Integration Test
161
169
continue-on-error : true
162
170
# bash {0} to allow test to continue to next step. in case of
163
171
shell : bash {0}
@@ -170,12 +178,12 @@ jobs:
170
178
START_TIME=$(date -u +%s)
171
179
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-amd64 -minikube-start-args=--driver=docker -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
172
180
END_TIME=$(date -u +%s)
173
- TIME_ELAPSED=$(($END_TIME-$START_TIME))
181
+ TIME_ELAPSED=$(($END_TIME-$START_TIME))
174
182
min=$((${TIME_ELAPSED}/60))
175
183
sec=$((${TIME_ELAPSED}%60))
176
184
TIME_ELAPSED="${min} min $sec seconds "
177
185
echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
178
- - name : Generate html report
186
+ - name : Generate HTML Report
179
187
shell : bash
180
188
run : |
181
189
cd minikube_binaries
@@ -184,7 +192,7 @@ jobs:
184
192
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
185
193
echo status: ${STAT}
186
194
FailNum=$(echo $STAT | jq '.NumberOfFail')
187
- TestsNum=$(echo $STAT | jq '.NumberOfTests')
195
+ TestsNum=$(echo $STAT | jq '.NumberOfTests')
188
196
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
189
197
echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
190
198
echo ::set-env name=STAT::${STAT}
@@ -215,11 +223,11 @@ jobs:
215
223
run : |
216
224
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
217
225
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
218
- - name : Download binaries
226
+ - name : Download Binaries
219
227
uses : actions/download-artifact@v1
220
228
with :
221
229
name : minikube_binaries
222
- - name : Run integration test
230
+ - name : Run Integration Test
223
231
continue-on-error : true
224
232
# bash {0} to allow test to continue to next step. in case of
225
233
shell : bash {0}
@@ -232,12 +240,12 @@ jobs:
232
240
START_TIME=$(date -u +%s)
233
241
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=none -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
234
242
END_TIME=$(date -u +%s)
235
- TIME_ELAPSED=$(($END_TIME-$START_TIME))
243
+ TIME_ELAPSED=$(($END_TIME-$START_TIME))
236
244
min=$((${TIME_ELAPSED}/60))
237
245
sec=$((${TIME_ELAPSED}%60))
238
246
TIME_ELAPSED="${min} min $sec seconds "
239
247
echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
240
- - name : Generate html report
248
+ - name : Generate HTML Report
241
249
shell : bash
242
250
run : |
243
251
cd minikube_binaries
@@ -246,7 +254,7 @@ jobs:
246
254
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
247
255
echo status: ${STAT}
248
256
FailNum=$(echo $STAT | jq '.NumberOfFail')
249
- TestsNum=$(echo $STAT | jq '.NumberOfTests')
257
+ TestsNum=$(echo $STAT | jq '.NumberOfTests')
250
258
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
251
259
echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
252
260
echo ::set-env name=STAT::${STAT}
@@ -276,12 +284,12 @@ jobs:
276
284
shell : bash
277
285
run : |
278
286
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.1.16/gopogh-linux-amd64
279
- sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
280
- - name : Download binaries
287
+ sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
288
+ - name : Download Binaries
281
289
uses : actions/download-artifact@v1
282
290
with :
283
291
name : minikube_binaries
284
- - name : Run integration test
292
+ - name : Run Integration Test
285
293
continue-on-error : true
286
294
# bash {0} to allow test to continue to next step. in case of
287
295
shell : bash {0}
@@ -294,12 +302,12 @@ jobs:
294
302
START_TIME=$(date -u +%s)
295
303
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=none -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
296
304
END_TIME=$(date -u +%s)
297
- TIME_ELAPSED=$(($END_TIME-$START_TIME))
305
+ TIME_ELAPSED=$(($END_TIME-$START_TIME))
298
306
min=$((${TIME_ELAPSED}/60))
299
307
sec=$((${TIME_ELAPSED}%60))
300
308
TIME_ELAPSED="${min} min $sec seconds "
301
309
echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
302
- - name : Generate html report
310
+ - name : Generate HTML Report
303
311
shell : bash
304
312
run : |
305
313
cd minikube_binaries
@@ -308,7 +316,7 @@ jobs:
308
316
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
309
317
echo status: ${STAT}
310
318
FailNum=$(echo $STAT | jq '.NumberOfFail')
311
- TestsNum=$(echo $STAT | jq '.NumberOfTests')
319
+ TestsNum=$(echo $STAT | jq '.NumberOfTests')
312
320
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
313
321
echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
314
322
echo ::set-env name=STAT::${STAT}
@@ -343,8 +351,8 @@ jobs:
343
351
sudo apt-key add - < Release.key || true
344
352
sudo apt-get update -qq
345
353
sudo apt-get -qq -y install podman
346
- sudo podman version || true
347
- sudo podman info || true
354
+ sudo podman version || true
355
+ sudo podman info || true
348
356
- name : Install gopogh
349
357
shell : bash
350
358
run : |
@@ -354,7 +362,7 @@ jobs:
354
362
uses : actions/download-artifact@v1
355
363
with :
356
364
name : minikube_binaries
357
- - name : Run integration test
365
+ - name : Run Integration Test
358
366
continue-on-error : true
359
367
# bash {0} to allow test to continue to next step. in case of
360
368
shell : bash {0}
@@ -367,12 +375,12 @@ jobs:
367
375
START_TIME=$(date -u +%s)
368
376
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome sudo -E ./e2e-linux-amd64 -minikube-start-args=--driver=podman -test.timeout=70m -test.v -timeout-multiplier=3 -binary=./minikube-linux-amd64 2>&1 | tee ./report/testout.txt
369
377
END_TIME=$(date -u +%s)
370
- TIME_ELAPSED=$(($END_TIME-$START_TIME))
378
+ TIME_ELAPSED=$(($END_TIME-$START_TIME))
371
379
min=$((${TIME_ELAPSED}/60))
372
380
sec=$((${TIME_ELAPSED}%60))
373
381
TIME_ELAPSED="${min} min $sec seconds "
374
382
echo ::set-env name=TIME_ELAPSED::${TIME_ELAPSED}
375
- - name : Generate html report
383
+ - name : Generate HTML Report
376
384
shell : bash
377
385
run : |
378
386
cd minikube_binaries
@@ -381,7 +389,7 @@ jobs:
381
389
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
382
390
echo status: ${STAT}
383
391
FailNum=$(echo $STAT | jq '.NumberOfFail')
384
- TestsNum=$(echo $STAT | jq '.NumberOfTests')
392
+ TestsNum=$(echo $STAT | jq '.NumberOfTests')
385
393
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
386
394
echo ::set-env name=GOPOGH_RESULT::${GOPOGH_RESULT}
387
395
echo ::set-env name=STAT::${STAT}
@@ -398,14 +406,14 @@ jobs:
398
406
echo $STAT | jq '.FailedTests' || true
399
407
echo "-------------------------------------------------------"
400
408
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
401
- # After all 4 integration tests finished
409
+ # After all 4 integration tests finished
402
410
# collect all the reports and upload
403
411
upload_all_reports :
404
412
if : always()
405
413
needs : [docker_ubuntu_16_04,docker_ubuntu_18_04,none_ubuntu16_04,none_ubuntu18_04,podman_ubuntu_18_04]
406
414
runs-on : ubuntu-18.04
407
415
steps :
408
- - name : download results docker_ubuntu_16_04
416
+ - name : Download Results docker_ubuntu_16_04
409
417
uses : actions/download-artifact@v1
410
418
with :
411
419
name : docker_ubuntu_16_04
@@ -415,7 +423,7 @@ jobs:
415
423
run : |
416
424
mkdir -p all_reports
417
425
cp -r docker_ubuntu_16_04 ./all_reports/
418
- - name : download results docker_ubuntu_18_04
426
+ - name : Download Results docker_ubuntu_18_04
419
427
uses : actions/download-artifact@v1
420
428
with :
421
429
name : docker_ubuntu_18_04
@@ -425,7 +433,7 @@ jobs:
425
433
run : |
426
434
mkdir -p all_reports
427
435
cp -r docker_ubuntu_18_04 ./all_reports/
428
- - name : download results none_ubuntu16_04
436
+ - name : Download Results none_ubuntu16_04
429
437
uses : actions/download-artifact@v1
430
438
with :
431
439
name : none_ubuntu16_04
@@ -435,21 +443,21 @@ jobs:
435
443
run : |
436
444
mkdir -p all_reports
437
445
cp -r none_ubuntu16_04 ./all_reports/
438
- - name : download results none_ubuntu18_04
446
+ - name : Download Results none_ubuntu18_04
439
447
uses : actions/download-artifact@v1
440
448
with :
441
449
name : none_ubuntu18_04
442
- - name : cp none_ubuntu18_04 to all_report
450
+ - name : Copy none_ubuntu18_04 to all_report
443
451
continue-on-error : true
444
452
shell : bash {0}
445
453
run : |
446
454
mkdir -p all_reports
447
455
cp -r none_ubuntu18_04 ./all_reports/
448
- - name : download results podman_ubuntu_18_04
456
+ - name : Download Results podman_ubuntu_18_04
449
457
uses : actions/download-artifact@v1
450
458
with :
451
459
name : podman_ubuntu_18_04
452
- - name : cp podman_ubuntu_18_04 to all_report
460
+ - name : Copy podman_ubuntu_18_04 to all_report
453
461
continue-on-error : true
454
462
shell : bash {0}
455
463
run : |
0 commit comments