From fb4f7a002cf40d073868278eb59ba92a7f9514e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Mon, 24 Jul 2023 11:00:13 +0200 Subject: [PATCH] gha: nydus: Add a no-op GHA for nydus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This newly added GHA does nothing, is not even triggered, and it's just a placeholder that we'll grow in the next commits / PRs, so we can actually start running the nydus tests as part of our CI. Fixes: #6543 Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/run-nydus-tests.yaml | 42 ++++++++++++++++++++++++++ tests/integration/nydus/gha-run.sh | 38 +++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .github/workflows/run-nydus-tests.yaml create mode 100755 tests/integration/nydus/gha-run.sh diff --git a/.github/workflows/run-nydus-tests.yaml b/.github/workflows/run-nydus-tests.yaml new file mode 100644 index 000000000..647582c08 --- /dev/null +++ b/.github/workflows/run-nydus-tests.yaml @@ -0,0 +1,42 @@ +name: CI | Run nydus tests +on: + workflow_call: + inputs: + tarball-suffix: + required: false + type: string + commit-hash: + required: false + type: string + +jobs: + run-nydus: + strategy: + fail-fast: true + matrix: + containerd_version: ['lts', 'active'] + vmm: ['clh', 'qemu', 'dragonball'] + runs-on: garm-ubuntu-2204 + env: + CONTAINERD_VERSION: ${{ matrix.containerd_version }} + GOPATH: ${{ github.workspace }} + KATA_HYPERVISOR: ${{ matrix.vmm }} + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ inputs.commit-hash }} + + - name: Install dependencies + run: bash tests/integration/nydus/gha-run.sh install-dependencies + + - name: get-kata-tarball + uses: actions/download-artifact@v3 + with: + name: kata-static-tarball-amd64${{ inputs.tarball-suffix }} + path: kata-artifacts + + - name: Install kata + run: bash tests/integration/nydus/gha-run.sh install-kata kata-artifacts + + - name: Run nydus tests + run: bash tests/integration/nydus/gha-run.sh run diff --git a/tests/integration/nydus/gha-run.sh b/tests/integration/nydus/gha-run.sh new file mode 100755 index 000000000..80ce8dcc3 --- /dev/null +++ b/tests/integration/nydus/gha-run.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# +# Copyright (c) 2023 Intel Corporation +# +# SPDX-License-Identifier: Apache-2.0 +# + +set -o errexit +set -o nounset +set -o pipefail + +kata_tarball_dir="${2:-kata-artifacts}" +nydus_dir="$(dirname "$(readlink -f "$0")")" +source "${cri_containerd_dir}/../../common.bash" + +function install_dependencies() { + info "Installing the dependencies needed for running the nydus tests" + + return 0 +} + +function run() { + info "Running nydus tests using ${KATA_HYPERVISOR} hypervisor" + + return 0 +} + +function main() { + action="${1:-}" + case "${action}" in + install-dependencies) install_dependencies ;; + install-kata) return 0 ;; + run) run ;; + *) >&2 die "Invalid argument" ;; + esac +} + +main "$@"