-
Notifications
You must be signed in to change notification settings - Fork 5k
WIP OLD: dont-merge add qemu functional tests on github action #21081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
+265
−15
Closed
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
05c011c
experiment vfkit on ghaction
medyagh 69c03f7
dont install kubectl
medyagh 0b79512
correct binary name
medyagh 6279f09
bump attempts to 600 temp
medyagh be4e03b
change timeout to 25m
medyagh 4004688
try qemu instead
medyagh e39cf31
comment vfkit for now
medyagh 6e40cc2
try full k8s
medyagh 739928c
add detect nested vm
medyagh eb1e914
log nested vm error
medyagh e59d000
try again
medyagh 2d0dcf1
detect nested vm in linux too
medyagh 779302b
add functional test for qemu
medyagh 2f55c91
fix logic
medyagh 4cb472f
change test home for qemu
medyagh 5f3278b
max memory
medyagh 77b594f
max memory
medyagh 03c8d1d
remove smoke test
medyagh 3da25a0
change memory to 8gb
medyagh 4efe28c
Merge branch 'master' into vfkit_ghaction
medyagh f48caa6
continue on err
medyagh 4cdfa30
add qemu on master branch too
medyagh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,12 @@ jobs: | |
- name: Docker Info | ||
shell: bash | ||
run: | | ||
echo "--------------------------" | ||
grep -i hypervisor /proc/cpuinfo || true | ||
echo "--------------------------" | ||
systemd-detect-virt || true | ||
echo "--------------------------" | ||
virt-what || true | ||
echo "--------------------------" | ||
docker version || true | ||
echo "--------------------------" | ||
|
@@ -142,7 +148,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -242,7 +248,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -415,7 +421,117 @@ jobs: | |
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi | ||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi | ||
|
||
functional_qemu_macos_intel: | ||
permissions: | ||
contents: none | ||
needs: [build_minikube_test_binaries] | ||
env: | ||
TIME_ELAPSED: time | ||
JOB_NAME: "functional_qemu_macos_intel" | ||
GOPOGH_RESULT: "" | ||
SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643 | ||
runs-on: macos-13 | ||
steps: | ||
- name: Install kubectl and docker-clie | ||
shell: bash | ||
run: | | ||
brew install kubectl | ||
brew install docker | ||
kubectl version --client=true | ||
- name: Install Qemu and socket_vmnet | ||
shell: bash | ||
run: | | ||
brew install meson qemu cdrtools coreutils tree | ||
fw=/usr/libexec/ApplicationFirewall/socketfilterfw | ||
sudo $fw --remove /usr/libexec/bootpd | ||
sudo $fw --add /usr/libexec/bootpd | ||
sudo $fw --unblock /usr/libexec/bootpd | ||
brew install socket_vmnet | ||
HOMEBREW=$(which brew) && sudo ${HOMEBREW} services start socket_vmnet | ||
- name: Info Block | ||
shell: bash | ||
run: | | ||
set -x | ||
sysctl -n hw.memsize | ||
echo "$(sysctl -n hw.memsize) / 1024 / 1024 / 1024" | bc | ||
sysctl -n hw.ncpu | ||
sysctl -n machdep.cpu.brand_string | ||
sysctl hw.model | ||
sysctl -n kern.hv_vmm_present | ||
sysctl -n kern.hv_support | ||
system_profiler SPHardwareDataType | ||
docker version || true | ||
docker info || true | ||
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 | ||
with: | ||
cache: true | ||
go-version: ${{env.GO_VERSION}} | ||
- name: Install gopogh | ||
shell: bash | ||
run: | | ||
go install github.com/medyagh/gopogh/cmd/[email protected] | ||
- name: Download Binaries | ||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | ||
with: | ||
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
set -x | ||
pwd | ||
cd minikube_binaries | ||
chmod a+x e2e-* | ||
chmod a+x minikube-* | ||
mkdir -p report | ||
# test home | ||
mkdir -p /tmp/th | ||
MINIKUBE_HOME=/tmp/th ./minikube-darwin-amd64 delete --all --purge | ||
START_TIME=$(date -u +%s) | ||
KUBECONFIG=$/tmp/th/kubeconfig MINIKUBE_HOME=/tmp/th ./e2e-darwin-amd64 -minikube-start-args="--vm-driver=qemu --memory=8g --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 | ||
END_TIME=$(date -u +%s) | ||
TIME_ELAPSED=$(($END_TIME-$START_TIME)) | ||
min=$((${TIME_ELAPSED}/60)) | ||
sec=$((${TIME_ELAPSED}%60)) | ||
TIME_ELAPSED="${min} min $sec seconds " | ||
echo "TIME_ELAPSED=${TIME_ELAPSED}" >> $GITHUB_ENV | ||
- name: Generate HTML Report | ||
shell: bash | ||
run: | | ||
cd minikube_binaries | ||
export PATH=${PATH}:`go env GOPATH`/bin | ||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true | ||
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 | ||
echo status: ${STAT} | ||
FailNum=$(echo $STAT | jq '.NumberOfFail') | ||
TestsNum=$(echo $STAT | jq '.NumberOfTests') | ||
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}" | ||
echo "GOPOGH_RESULT=${GOPOGH_RESULT}" >> $GITHUB_ENV | ||
echo 'STAT<<EOF' >> $GITHUB_ENV | ||
echo "${STAT}" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | ||
with: | ||
name: functional_qemu_macos_intel | ||
path: minikube_binaries/report | ||
- name: The End Result functional_qemu_macos_intel | ||
shell: bash | ||
run: | | ||
echo ${GOPOGH_RESULT} | ||
numFail=$(echo $STAT | jq '.NumberOfFail') | ||
numPass=$(echo $STAT | jq '.NumberOfPass') | ||
echo "*******************${numPass} Passes :) *******************" | ||
echo $STAT | jq '.PassedTests' || true | ||
echo "*******************************************************" | ||
echo "---------------- ${numFail} Failures :( ----------------------------" | ||
echo $STAT | jq '.FailedTests' || true | ||
echo "-------------------------------------------------------" | ||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi | ||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi | ||
functional_podman_ubuntu: | ||
permissions: | ||
contents: none | ||
|
@@ -465,7 +581,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -655,6 +771,7 @@ jobs: | |
functional_docker_rootless_containerd_ubuntu, | ||
functional_podman_ubuntu, | ||
functional_baremetal_ubuntu22_04, | ||
functional_qemu_macos_intel, | ||
] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -671,6 +788,7 @@ jobs: | |
cp -r ./functional_docker_rootless_containerd_ubuntu ./all_reports/ | ||
cp -r ./functional_podman_ubuntu ./all_reports/ | ||
cp -r ./functional_baremetal_ubuntu22_04 ./all_reports/ | ||
cp -r ./functional_qemu_macos_intel ./all_reports/ | ||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | ||
with: | ||
name: all_reports | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,12 @@ jobs: | |
- name: Docker Info | ||
shell: bash | ||
run: | | ||
echo "--------------------------" | ||
grep -i hypervisor /proc/cpuinfo || true | ||
echo "--------------------------" | ||
systemd-detect-virt || true | ||
echo "--------------------------" | ||
virt-what || true | ||
echo "--------------------------" | ||
docker version || true | ||
echo "--------------------------" | ||
|
@@ -140,7 +146,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -240,7 +246,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -413,7 +419,117 @@ jobs: | |
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi | ||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi | ||
|
||
functional_qemu_macos_intel: | ||
permissions: | ||
contents: none | ||
needs: [build_minikube_test_binaries] | ||
env: | ||
TIME_ELAPSED: time | ||
JOB_NAME: "functional_qemu_macos_intel" | ||
GOPOGH_RESULT: "" | ||
SHELL: "/bin/bash" # To prevent https://github.com/kubernetes/minikube/issues/6643 | ||
runs-on: macos-13 | ||
steps: | ||
- name: Install kubectl and docker-clie | ||
shell: bash | ||
run: | | ||
brew install kubectl | ||
brew install docker | ||
kubectl version --client=true | ||
- name: Install Qemu and socket_vmnet | ||
shell: bash | ||
run: | | ||
brew install meson qemu cdrtools coreutils tree | ||
fw=/usr/libexec/ApplicationFirewall/socketfilterfw | ||
sudo $fw --remove /usr/libexec/bootpd | ||
sudo $fw --add /usr/libexec/bootpd | ||
sudo $fw --unblock /usr/libexec/bootpd | ||
brew install socket_vmnet | ||
HOMEBREW=$(which brew) && sudo ${HOMEBREW} services start socket_vmnet | ||
- name: Info Block | ||
shell: bash | ||
run: | | ||
set -x | ||
sysctl -n hw.memsize | ||
echo "$(sysctl -n hw.memsize) / 1024 / 1024 / 1024" | bc | ||
sysctl -n hw.ncpu | ||
sysctl -n machdep.cpu.brand_string | ||
sysctl hw.model | ||
sysctl -n kern.hv_vmm_present | ||
sysctl -n kern.hv_support | ||
system_profiler SPHardwareDataType | ||
docker version || true | ||
docker info || true | ||
- uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 | ||
with: | ||
cache: true | ||
go-version: ${{env.GO_VERSION}} | ||
- name: Install gopogh | ||
shell: bash | ||
run: | | ||
go install github.com/medyagh/gopogh/cmd/[email protected] | ||
- name: Download Binaries | ||
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 | ||
with: | ||
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
set -x | ||
pwd | ||
cd minikube_binaries | ||
chmod a+x e2e-* | ||
chmod a+x minikube-* | ||
mkdir -p report | ||
# test home | ||
mkdir -p /tmp/th | ||
MINIKUBE_HOME=/tmp/th ./minikube-darwin-amd64 delete --all --purge | ||
START_TIME=$(date -u +%s) | ||
KUBECONFIG=$/tmp/th/kubeconfig MINIKUBE_HOME=/tmp/th ./e2e-darwin-amd64 -minikube-start-args="--vm-driver=qemu --memory=8g --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 | ||
END_TIME=$(date -u +%s) | ||
TIME_ELAPSED=$(($END_TIME-$START_TIME)) | ||
min=$((${TIME_ELAPSED}/60)) | ||
sec=$((${TIME_ELAPSED}%60)) | ||
TIME_ELAPSED="${min} min $sec seconds " | ||
echo "TIME_ELAPSED=${TIME_ELAPSED}" >> $GITHUB_ENV | ||
- name: Generate HTML Report | ||
shell: bash | ||
run: | | ||
cd minikube_binaries | ||
export PATH=${PATH}:`go env GOPATH`/bin | ||
go tool test2json -t < ./report/testout.txt > ./report/testout.json || true | ||
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 | ||
echo status: ${STAT} | ||
FailNum=$(echo $STAT | jq '.NumberOfFail') | ||
TestsNum=$(echo $STAT | jq '.NumberOfTests') | ||
GOPOGH_RESULT="${JOB_NAME} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}" | ||
echo "GOPOGH_RESULT=${GOPOGH_RESULT}" >> $GITHUB_ENV | ||
echo 'STAT<<EOF' >> $GITHUB_ENV | ||
echo "${STAT}" >> $GITHUB_ENV | ||
echo 'EOF' >> $GITHUB_ENV | ||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | ||
with: | ||
name: functional_qemu_macos_intel | ||
path: minikube_binaries/report | ||
- name: The End Result functional_qemu_macos_intel | ||
shell: bash | ||
run: | | ||
echo ${GOPOGH_RESULT} | ||
numFail=$(echo $STAT | jq '.NumberOfFail') | ||
numPass=$(echo $STAT | jq '.NumberOfPass') | ||
echo "*******************${numPass} Passes :) *******************" | ||
echo $STAT | jq '.PassedTests' || true | ||
echo "*******************************************************" | ||
echo "---------------- ${numFail} Failures :( ----------------------------" | ||
echo $STAT | jq '.FailedTests' || true | ||
echo "-------------------------------------------------------" | ||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi | ||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi | ||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi | ||
functional_podman_ubuntu: | ||
permissions: | ||
contents: none | ||
|
@@ -463,7 +579,7 @@ jobs: | |
name: minikube_binaries | ||
path: minikube_binaries | ||
- name: Run Integration Test | ||
continue-on-error: false | ||
continue-on-error: true | ||
# bash {0} to allow test to continue to next step. in case of | ||
shell: bash {0} | ||
run: | | ||
|
@@ -653,6 +769,7 @@ jobs: | |
functional_docker_rootless_containerd_ubuntu, | ||
functional_podman_ubuntu, | ||
functional_baremetal_ubuntu22_04, | ||
functional_qemu_macos_intel, | ||
] | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
|
@@ -669,6 +786,7 @@ jobs: | |
cp -r ./functional_docker_rootless_containerd_ubuntu ./all_reports/ | ||
cp -r ./functional_podman_ubuntu ./all_reports/ | ||
cp -r ./functional_baremetal_ubuntu22_04 ./all_reports/ | ||
cp -r ./functional_qemu_macos_intel ./all_reports/ | ||
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 | ||
with: | ||
name: all_reports | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I stole this from @nirs I am sure some of them are extra need to remove some