Skip to content

Commit 2f81d48

Browse files
authored
Merge pull request #9979 from ilya-zuyev/ilyaz/arm64_integration_tests
Add github action to run linux/arm64 integration tests
2 parents 2e6ceb7 + 2c07606 commit 2f81d48

File tree

6 files changed

+262
-30
lines changed

6 files changed

+262
-30
lines changed

.github/workflows/iso.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
- name: Install gopogh
8383
shell: bash
8484
run: |
85-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
85+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
8686
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
8787
sudo apt-get install -y jq
8888
- name: Run Integration Test

.github/workflows/kic_image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- name: Install gopogh
6161
shell: bash
6262
run: |
63-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
63+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
6464
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
6565
sudo apt-get install -y jq
6666
rm -f gopogh-linux-amd64 || true

.github/workflows/master.yml

Lines changed: 125 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120

121121
shell: bash
122122
run: |
123-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
123+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
124124
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
125125
- name: Download Binaries
126126
uses: actions/download-artifact@v1
@@ -205,7 +205,7 @@ jobs:
205205

206206
shell: bash
207207
run: |
208-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
208+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-darwin-amd64
209209
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
210210
- name: Install docker
211211
shell: bash
@@ -350,7 +350,7 @@ jobs:
350350
continue-on-error: true
351351
shell: powershell
352352
run: |
353-
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
353+
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
354354
choco install -y kubernetes-cli
355355
choco install -y jq
356356
choco install -y caffeine
@@ -487,7 +487,7 @@ jobs:
487487
shell: powershell
488488
run: |
489489
$ErrorActionPreference = "SilentlyContinue"
490-
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
490+
(New-Object Net.WebClient).DownloadFile("https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh.exe", "C:\ProgramData\chocolatey\bin\gopogh.exe")
491491
choco install -y kubernetes-cli
492492
choco install -y jq
493493
choco install -y caffeine
@@ -592,7 +592,7 @@ jobs:
592592

593593
shell: bash
594594
run: |
595-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
595+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
596596
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
597597
- name: Download Binaries
598598
uses: actions/download-artifact@v1
@@ -651,6 +651,117 @@ jobs:
651651
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
652652
if [ "$numPass" -lt 26 ];then echo "*** Failed to pass at least 26 ! ***";exit 2;fi
653653
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
654+
functional_docker_ubuntu_arm64:
655+
needs: [ build_minikube ]
656+
runs-on: [ self-hosted, arm64 ]
657+
env:
658+
TIME_ELAPSED: time
659+
JOB_NAME: "functional_docker_ubuntu_arm64"
660+
GOPOGH_RESULT: ""
661+
SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
662+
steps:
663+
- name: Install kubectl
664+
shell: bash
665+
run: |
666+
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.18.0/bin/linux/arm64/kubectl
667+
sudo install kubectl /usr/local/bin/kubectl
668+
kubectl version --client=true
669+
670+
- name: Install gopogh
671+
shell: bash
672+
run: |
673+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-arm64
674+
sudo install gopogh-linux-arm64 /usr/local/bin/gopogh
675+
676+
- name: Install tools
677+
shell: bash
678+
run: |
679+
sudo apt update
680+
sudo apt install -y jq docker
681+
682+
- name: Docker Info
683+
shell: bash
684+
run: |
685+
echo "--------------------------"
686+
docker version || true
687+
echo "--------------------------"
688+
docker info || true
689+
echo "--------------------------"
690+
docker system df || true
691+
echo "--------------------------"
692+
docker system info --format='{{json .}}'|| true
693+
echo "--------------------------"
694+
docker ps || true
695+
echo "--------------------------"
696+
# go 1.14.6+ is needed because of this bug https://github.com/golang/go/issues/39308
697+
- uses: actions/setup-go@v2
698+
with:
699+
go-version: '1.15.2'
700+
stable: true
701+
702+
- name: Download Binaries
703+
uses: actions/download-artifact@v1
704+
with:
705+
name: minikube_binaries
706+
707+
- name: Run Integration Test
708+
continue-on-error: false
709+
# bash {0} to allow test to continue to next step. in case of
710+
shell: bash {0}
711+
run: |
712+
cd minikube_binaries
713+
mkdir -p report
714+
mkdir -p testhome
715+
chmod a+x e2e-*
716+
chmod a+x minikube-*
717+
START_TIME=$(date -u +%s)
718+
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-linux-arm64 -minikube-start-args=--vm-driver=docker -test.run TestFunctional -test.timeout=10m -test.v -timeout-multiplier=1.5 -binary=./minikube-linux-arm64 2>&1 | tee ./report/testout.txt
719+
END_TIME=$(date -u +%s)
720+
TIME_ELAPSED=$(($END_TIME-$START_TIME))
721+
min=$((${TIME_ELAPSED}/60))
722+
sec=$((${TIME_ELAPSED}%60))
723+
TIME_ELAPSED="${min} min $sec seconds "
724+
echo "TIME_ELAPSED=${TIME_ELAPSED}" >> $GITHUB_ENV
725+
726+
- name: Generate HTML Report
727+
shell: bash
728+
run: |
729+
cd minikube_binaries
730+
export PATH=${PATH}:`go env GOPATH`/bin
731+
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
732+
STAT=$(gopogh -in ./report/testout.json -out ./report/testout.html -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
733+
echo status: ${STAT}
734+
FailNum=$(echo $STAT | jq '.NumberOfFail')
735+
TestsNum=$(echo $STAT | jq '.NumberOfTests')
736+
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
737+
echo "GOPOGH_RESULT=${GOPOGH_RESULT}" >> $GITHUB_ENV
738+
echo 'STAT<<EOF' >> $GITHUB_ENV
739+
echo "${STAT}" >> $GITHUB_ENV
740+
echo 'EOF' >> $GITHUB_ENV
741+
742+
- uses: actions/upload-artifact@v1
743+
with:
744+
name: functional_docker_ubuntu_arm64
745+
path: minikube_binaries/report
746+
747+
- name: The End Result - functional_docker_ubuntu_arm64
748+
shell: bash
749+
run: |
750+
echo ${GOPOGH_RESULT}
751+
numFail=$(echo $STAT | jq '.NumberOfFail')
752+
numPass=$(echo $STAT | jq '.NumberOfPass')
753+
echo "*******************${numPass} Passes :) *******************"
754+
echo $STAT | jq '.PassedTests' || true
755+
echo "*******************************************************"
756+
echo "---------------- ${numFail} Failures :( ----------------------------"
757+
echo $STAT | jq '.FailedTests' || true
758+
echo "-------------------------------------------------------"
759+
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
760+
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
761+
if [ "$numPass" -lt 20 ];then echo "*** Failed to pass at least 20 ! ***";exit 2;fi
762+
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
763+
764+
654765
addons_certs_docker_ubuntu:
655766
runs-on: ubuntu-18.04
656767
env:
@@ -689,7 +800,7 @@ jobs:
689800

690801
shell: bash
691802
run: |
692-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
803+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
693804
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
694805
- name: Download Binaries
695806
uses: actions/download-artifact@v1
@@ -771,7 +882,7 @@ jobs:
771882

772883
shell: bash
773884
run: |
774-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
885+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-darwin-amd64
775886
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
776887
- name: Install docker
777888
shell: bash
@@ -883,7 +994,7 @@ jobs:
883994

884995
shell: bash
885996
run: |
886-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
997+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
887998
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
888999
- name: Download Binaries
8891000
uses: actions/download-artifact@v1
@@ -967,7 +1078,7 @@ jobs:
9671078

9681079
shell: bash
9691080
run: |
970-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
1081+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-darwin-amd64
9711082
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
9721083
- name: Download Binaries
9731084
uses: actions/download-artifact@v1
@@ -1074,7 +1185,7 @@ jobs:
10741185

10751186
shell: bash
10761187
run: |
1077-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-linux-amd64
1188+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-linux-amd64
10781189
sudo install gopogh-linux-amd64 /usr/local/bin/gopogh
10791190
- name: Download Binaries
10801191
uses: actions/download-artifact@v1
@@ -1156,7 +1267,7 @@ jobs:
11561267

11571268
shell: bash
11581269
run: |
1159-
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.3.0/gopogh-darwin-amd64
1270+
curl -LO https://github.com/medyagh/gopogh/releases/download/v0.4.0/gopogh-darwin-amd64
11601271
sudo install gopogh-darwin-amd64 /usr/local/bin/gopogh
11611272
- name: Download Binaries
11621273
uses: actions/download-artifact@v1
@@ -1235,6 +1346,7 @@ jobs:
12351346
functional_docker_windows,
12361347
functional_hyperv_windows,
12371348
functional_baremetal_ubuntu18_04,
1349+
functional_docker_ubuntu_arm64,
12381350
addons_certs_docker_ubuntu,
12391351
addons_certs_virtualbox_macos,
12401352
multinode_docker_ubuntu,
@@ -1257,12 +1369,14 @@ jobs:
12571369
cp -r ./functional_docker_windows ./all_reports/
12581370
cp -r ./functional_hyperv_windows ./all_reports/
12591371
cp -r ./functional_baremetal_ubuntu18_04 ./all_reports/
1372+
cp -r ./functional_docker_ubuntu_arm64 ./all_reports/
12601373
cp -r ./addons_certs_docker_ubuntu ./all_reports/
12611374
cp -r ./addons_certs_virtualbox_macos ./all_reports/
12621375
cp -r ./multinode_docker_ubuntu ./all_reports/
12631376
cp -r ./multinode_virtualbox_macos ./all_reports/
12641377
cp -r ./preload_dockerflags_docker_ubuntu ./all_reports/
12651378
cp -r ./pause_preload_dockerflags_virtualbox_macos ./all_reports/
1379+
12661380
- uses: actions/upload-artifact@v1
12671381
with:
12681382
name: all_reports

0 commit comments

Comments
 (0)