From 784f70980d70f190039c39a03d94de5f839aacd0 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Thu, 2 Jul 2026 19:22:14 +0200 Subject: [PATCH] ci: Use the GitHub action grouping syntax This groups log output in the github UI and makes it easier to just show the actual test results, the groups are hidden under an extra drop down and only shown when selected. Inspired by Miloslav container-libs change for this. Signed-off-by: Paul Holzinger --- hack/ci/ci.sh | 5 +++++ hack/ci/runner.sh | 14 ++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/hack/ci/ci.sh b/hack/ci/ci.sh index 5d8eab61c1..9519a3973d 100755 --- a/hack/ci/ci.sh +++ b/hack/ci/ci.sh @@ -20,6 +20,7 @@ IMAGE_URL="https://objectstorage.us-ashburn-1.oraclecloud.com/n/id0lmbbwgcdv/b/p trap "limactl delete --force $LIMA_VM_NAME" EXIT +echo "::group::Starting VM" limactl --yes start --plain --name=$LIMA_VM_NAME --cpus $(nproc) --memory 8 --nested-virt \ --set ".images=[{\"location\":\"$IMAGE_URL\", \"arch\": \"x86_64\"}]" \ "$SCRIPT_DIR/template.lima.yml" @@ -28,12 +29,16 @@ limactl shell $LIMA_VM_NAME mkdir -p /var/tmp/podman-container-tools limactl copy "$REPO_DIR" $LIMA_VM_NAME:/var/tmp/podman-container-tools/podman +echo "::endgroup::" + set +e limactl shell --preserve-env --workdir /var/tmp/podman-container-tools/podman $LIMA_VM_NAME ./hack/ci/runner.sh "${@}" rc=$? +echo "::group::Collecting logs" limactl copy $LIMA_VM_NAME:/var/tmp/podman-container-tools/podman/hack/ci/logs/ $SCRIPT_DIR/logs +echo "::endgroup::" # TODO: figure out how to cache the binaries from the build job to the actual test tasks # Copy the binaries out of the VM in gh actions so we can upload them as artifact diff --git a/hack/ci/runner.sh b/hack/ci/runner.sh index f38d6571c1..7ba0f68435 100755 --- a/hack/ci/runner.sh +++ b/hack/ci/runner.sh @@ -9,6 +9,8 @@ SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) source "$SCRIPT_DIR/lib.sh" +echo "::group::Test Setup" + parse_args "$@" PRESERVE_ENVS="CI_USE_REGISTRY_CACHE,CI_DESIRED_COMPOSEFS,OCI_RUNTIME,CGROUP_MANAGER,STORAGE_FS,STORAGE_OPTIONS_OVERLAY,STORAGE_OPTIONS_VFS,PODMAN_UPGRADE_FROM" @@ -127,15 +129,14 @@ fi $SUDO git config --global user.name "Podman CI" $SUDO git config --global user.email "no-reply@podman.io" +echo "::endgroup::" # Test Setup + ### LOG various relevant things -echo -echo "#################" -echo "Setup complete, logging versions" -echo "#################" - +echo "::group::Logging system info" "$SCRIPT_DIR/logcollector.sh" packages "$SCRIPT_DIR/logcollector.sh" ip +echo "::endgroup::" # Logging system info mkdir -p "$SCRIPT_DIR/logs" # Log the journal at the end. @@ -228,9 +229,6 @@ function run_machine() { $SUDO make ${MODE}machine } -echo -echo "#################" echo "Starting Test" -echo "#################" run_$TEST