Skip to content

Commit 84f6955

Browse files
committed
format better
1 parent 3d1f793 commit 84f6955

File tree

1 file changed

+27
-14
lines changed

1 file changed

+27
-14
lines changed

.github/workflows/functional_test.yml

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -51,31 +51,36 @@ jobs:
5151
driver: docker
5252
cruntime: docker
5353
os: ubuntu-22.04
54-
# TODO: adding per environment max time-out
54+
test-timeout: 10m
5555
- name: docker-containerd-ubuntu-22.04-x86_64
5656
driver: docker
5757
cruntime: containerd
5858
extra-start-args: --container-runtime=containerd
5959
os: ubuntu-22.04
60+
test-timeout: 10m
6061
- name: docker-containerd-rootless-ubuntu-22.04-x86_64
6162
driver: docker
6263
cruntime: containerd
6364
os: ubuntu-22.04
65+
test-timeout: 10m
6466
extra-start-args: --container-runtime=containerd --rootless
6567
rootless: true
6668
- name: podman-docker-ubuntu-24.04-x86_64
6769
driver: podman
6870
cruntime: docker
6971
os: ubuntu-24.04
72+
test-timeout: 10m
7073
- name: baremetal-docker-ubuntu-22.04-x86_64
7174
driver: none
7275
cruntime: docker
7376
os: ubuntu-22.04
77+
test-timeout: 7m
7478
- name: qemu-docker-macos-13-x86_64
7579
driver: qemu
7680
cruntime: docker
7781
os: macos-13
7882
extra-args: --network socket_vmnet
83+
test-timeout: 27m
7984
steps:
8085
- name: Info Block (macOS)
8186
if: runner.os == 'macOS'
@@ -354,7 +359,7 @@ jobs:
354359
chmod a+x ./minikube-*
355360
./minikube-$(go env GOOS)-$(go env GOARCH) delete --all --purge
356361
START_TIME=$(date -u +%s)
357-
./e2e-$(go env GOOS)-$(go env GOARCH) -minikube-start-args=" --driver=${{ matrix.driver }} ${{ matrix.extra-start-args }} --wait-timeout=15m -v=6 --alsologtostderr" -test.run TestFunctional -test.timeout=35m -test.v -binary=./minikube-$(go env GOOS)-$(go env GOARCH) 2>&1 | tee ./report/testout.txt
362+
./e2e-$(go env GOOS)-$(go env GOARCH) -minikube-start-args=" --driver=${{ matrix.driver }} ${{ matrix.extra-start-args }} -v=6 --alsologtostderr" -test.run TestFunctional -test.timeout=${{ matrix.test-timeout }} -test.v -binary=./minikube-$(go env GOOS)-$(go env GOARCH) 2>&1 | tee ./report/testout.txt
358363
END_TIME=$(date -u +%s)
359364
TIME_ELAPSED=$(($END_TIME-$START_TIME))
360365
min=$((${TIME_ELAPSED}/60))
@@ -369,8 +374,15 @@ jobs:
369374
STAT=$(gopogh -in ./report/testout.json -out_html ./report/testout.html -out_summary ./report/testout_summary.json -name "${{ matrix.name }} ${GITHUB_REF}" -repo "${GITHUB_REPOSITORY}" -details "${GITHUB_SHA}") || true
370375
FailNum=$(echo $STAT | jq '.NumberOfFail')
371376
TestsNum=$(echo $STAT | jq '.NumberOfTests')
377+
if [ "${FailNum}" -eq 0 ]; then
378+
STATUS_ICON="✓"
379+
elif [ "${FailNum}" -gt 1 ]; then
380+
STATUS_ICON="✗"
381+
else
382+
STATUS_ICON="✗"
383+
fi
372384
# Result in in one sentence
373-
RESULT_SHORT="${{ matrix.name }} : completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
385+
RESULT_SHORT="${STATUS_ICON} Completed with ${FailNum} / ${TestsNum} failures in ${TIME_ELAPSED}"
374386
echo "RESULT_SHORT=${RESULT_SHORT}" >> $GITHUB_ENV
375387
echo 'STAT<<EOF' >> $GITHUB_ENV
376388
echo "${STAT}" >> $GITHUB_ENV
@@ -404,7 +416,7 @@ jobs:
404416
if [ -n "$ARTIFACT_ID" ]; then
405417
URL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/$ARTIFACT_ID"
406418
echo "Gopogh report artifact ($ARTIFACT_NAME): $URL"
407-
echo "Gopogh report artifact URL: $URL" >> $GITHUB_STEP_SUMMARY
419+
echo "Download Gopogh report: $URL" >> $GITHUB_STEP_SUMMARY
408420
else
409421
echo "Could not determine artifact ID (action version may not expose it). Find artifact named: $ARTIFACT_NAME"
410422
echo "Report artifact name: $ARTIFACT_NAME" >> $GITHUB_STEP_SUMMARY
@@ -415,28 +427,29 @@ jobs:
415427
numFail=$(echo "$STAT" | jq -r '.NumberOfFail // 0')
416428
numPass=$(echo "$STAT" | jq -r '.NumberOfPass // 0')
417429
numSkip=$(echo "$STAT" | jq -r '.NumberOfSkip // 0')
418-
419-
echo "------------------------ Passed ------------------------"
430+
echo "Failed: ${numFail}" | tee -a "$summary"
420431
echo "Passed: ${numPass}" | tee -a "$summary"
421-
if [ "$numPass" -gt 0 ]; then
422-
echo "$STAT" | jq -r '.PassedTests[]? | " ✓ \(.)"'
423-
fi
432+
echo "Skipped: ${numSkip}" | tee -a "$summary"
424433
425434
if [ "$numFail" -gt 0 ]; then
426-
echo "------------------------ Failed ------------------------" | tee -a "$summary"
427-
echo "Failed: ${numFail}" | tee -a "$summary"
435+
echo "------------------------ ${numFail} Failed ------------------------" | tee -a "$summary"
428436
echo "$STAT" | jq -r '.FailedTests[]? | " ✗ \(.)"' | tee -a "$summary"
429437
fi
430438
431-
echo "------------------------ Skipped ------------------------" | tee -a "$summary"
432-
echo "Skipped: ${numSkip}" | tee -a "$summary"
439+
echo "------------------------${numPass} Passed ------------------------"
440+
if [ "$numPass" -gt 0 ]; then
441+
echo "$STAT" | jq -r '.PassedTests[]? | " ✓ \(.)"'
442+
fi
443+
433444
if [ "$numSkip" -gt 0 ]; then
445+
echo "------------------------${numSkip} Skipped ------------------------" | tee -a "$summary"
434446
echo "$STAT" | jq -r '.SkippedTests[]? | " • \(.)"' | tee -a "$summary"
435447
fi
448+
436449
echo "---------------------------------------------------------"
437450
echo $summary >> $GITHUB_STEP_SUMMARY
438451
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
439452
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
440453
# Safe Guard for when tests gets skipped and no failures
441-
if [ "$numPass" -lt 35 ];then echo "*** Failed to pass at least 35 ! ***";exit 2;fi
454+
if [ "$numPass" -lt 45 ];then echo "*** Failed to pass at least 45 ! ***";exit 2;fi
442455

0 commit comments

Comments
 (0)