@@ -415,7 +415,121 @@ jobs:
415415 if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
416416 if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi
417417 if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
418-
418+ functional_qemu_macos13_intel :
419+ permissions :
420+ contents : none
421+ needs : [build_minikube_test_binaries]
422+ env :
423+ TIME_ELAPSED : time
424+ JOB_NAME : " functional_qemu_macos13_intel"
425+ GOPOGH_RESULT : " "
426+ SHELL : " /bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643
427+ runs-on : macos-13
428+ steps :
429+ - name : Install kubectl and docker-cli
430+ shell : bash
431+ run : |
432+ brew install kubectl
433+ brew install docker
434+ kubectl version --client=true
435+ - name : Install Qemu and socket_vmnet
436+ shell : bash
437+ run : |
438+ brew update
439+ brew install qemu socket_vmnet
440+ HOMEBREW=$(which brew) && sudo ${HOMEBREW} services start socket_vmnet
441+ fw=/usr/libexec/ApplicationFirewall/socketfilterfw
442+ sudo $fw --remove /usr/libexec/bootpd
443+ sudo $fw --add /usr/libexec/bootpd
444+ sudo $fw --unblock /usr/libexec/bootpd
445+ - name : Info Block
446+ shell : bash
447+ run : |
448+ set -x
449+ uname -a
450+ sysctl -n hw.memsize
451+ echo "$(sysctl -n hw.memsize) / 1024 / 1024 / 1024" | bc
452+ sysctl -n hw.ncpu
453+ sysctl -n machdep.cpu.brand_string
454+ sysctl hw.model
455+ sysctl -n kern.hv_vmm_present
456+ sysctl -n kern.hv_support
457+ system_profiler SPHardwareDataType
458+ docker version || true
459+ docker info || true
460+ echo "macOS version:"
461+ sw_vers
462+ ifconfig
463+ - uses : actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5
464+ with :
465+ cache : true
466+ go-version : ${{env.GO_VERSION}}
467+ - name : Install gopogh
468+ shell : bash
469+ run : |
470+ go install github.com/medyagh/gopogh/cmd/[email protected] 471+ - name : Download Binaries
472+ uses : actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
473+ with :
474+ name : minikube_binaries
475+ path : minikube_binaries
476+ - name : Run Integration Test
477+ continue-on-error : true
478+ # bash {0} to allow test to continue to next step. in case of
479+ shell : bash {0}
480+ run : |
481+ set -x
482+ pwd
483+ cd minikube_binaries
484+ chmod a+x e2e-*
485+ chmod a+x minikube-*
486+ mkdir -p report
487+ # test home
488+ mkdir -p /tmp/th
489+ MINIKUBE_HOME=/tmp/th ./minikube-darwin-amd64 delete --all --purge
490+ START_TIME=$(date -u +%s)
491+ KUBECONFIG=$/tmp/th/kubeconfig MINIKUBE_HOME=/tmp/th ./e2e-darwin-amd64 -minikube-start-args="--vm-driver=qemu --wait-timeout=15m --network socket_vmnet" -test.run TestFunctional -test.timeout=40m -test.v -timeout-multiplier=1.5 -binary=./minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
492+ END_TIME=$(date -u +%s)
493+ TIME_ELAPSED=$(($END_TIME-$START_TIME))
494+ min=$((${TIME_ELAPSED}/60))
495+ sec=$((${TIME_ELAPSED}%60))
496+ TIME_ELAPSED="${min} min $sec seconds "
497+ echo "TIME_ELAPSED=${TIME_ELAPSED}" >> $GITHUB_ENV
498+ - name : Generate HTML Report
499+ shell : bash
500+ run : |
501+ cd minikube_binaries
502+ export PATH=${PATH}:`go env GOPATH`/bin
503+ go tool test2json -t < ./report/testout.txt > ./report/testout.json || true
504+ STAT=$(gopogh -in ./report/testout.json -out_html ./report/testout.html -out_summary ./report/testout_summary.json -name "${JOB_NAME} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
505+ echo status: ${STAT}
506+ FailNum=$(echo $STAT | jq '.NumberOfFail')
507+ TestsNum=$(echo $STAT | jq '.NumberOfTests')
508+ GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
509+ echo "GOPOGH_RESULT=${GOPOGH_RESULT}" >> $GITHUB_ENV
510+ echo 'STAT<<EOF' >> $GITHUB_ENV
511+ echo "${STAT}" >> $GITHUB_ENV
512+ echo 'EOF' >> $GITHUB_ENV
513+ - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
514+ with :
515+ name : functional_qemu_macos13_intel
516+ path : minikube_binaries/report
517+ - name : The End Result functional_qemu_macos13_intel
518+ shell : bash
519+ run : |
520+ echo ${GOPOGH_RESULT}
521+ numFail=$(echo $STAT | jq '.NumberOfFail')
522+ numPass=$(echo $STAT | jq '.NumberOfPass')
523+ echo "*******************${numPass} Passes :) *******************"
524+ echo $STAT | jq '.PassedTests' || true
525+ echo "*******************************************************"
526+ echo "---------------- ${numFail} Failures :( ----------------------------"
527+ echo $STAT | jq '.FailedTests' || true
528+ echo "-------------------------------------------------------"
529+ if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
530+ if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
531+ if [ "$numPass" -lt 56 ];then echo "*** Failed to pass at least 56 ! ***";exit 2;fi
532+ if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
419533 functional_podman_ubuntu :
420534 permissions :
421535 contents : none
@@ -655,6 +769,7 @@ jobs:
655769 functional_docker_rootless_containerd_ubuntu,
656770 functional_podman_ubuntu,
657771 functional_baremetal_ubuntu22_04,
772+ functional_qemu_macos13_intel,
658773 ]
659774 runs-on : ubuntu-22.04
660775 steps :
@@ -671,6 +786,7 @@ jobs:
671786 cp -r ./functional_docker_rootless_containerd_ubuntu ./all_reports/
672787 cp -r ./functional_podman_ubuntu ./all_reports/
673788 cp -r ./functional_baremetal_ubuntu22_04 ./all_reports/
789+ cp -r ./functional_qemu_macos13_intel ./all_reports/
674790 - uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
675791 with :
676792 name : all_reports
0 commit comments