name: CI | Run kata coco tests on: workflow_call: inputs: registry: required: true type: string repo: required: true type: string tag: required: true type: string pr-number: required: true type: string commit-hash: required: false type: string target-branch: required: false type: string default: "" jobs: run-kata-deploy-tests-on-tdx: strategy: fail-fast: false matrix: vmm: - qemu-tdx runs-on: tdx env: DOCKER_REGISTRY: ${{ inputs.registry }} DOCKER_REPO: ${{ inputs.repo }} DOCKER_TAG: ${{ inputs.tag }} PR_NUMBER: ${{ inputs.pr-number }} KATA_HYPERVISOR: ${{ matrix.vmm }} KUBERNETES: "k3s" USING_NFD: "true" steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.commit-hash }} fetch-depth: 0 - name: Rebase atop of the latest target branch run: | ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" env: TARGET_BRANCH: ${{ inputs.target-branch }} - name: Run tests run: bash tests/functional/kata-deploy/gha-run.sh run-tests run-k8s-tests-on-tdx: strategy: fail-fast: false matrix: vmm: - qemu-tdx runs-on: tdx env: DOCKER_REGISTRY: ${{ inputs.registry }} DOCKER_REPO: ${{ inputs.repo }} DOCKER_TAG: ${{ inputs.tag }} PR_NUMBER: ${{ inputs.pr-number }} KATA_HYPERVISOR: ${{ matrix.vmm }} KUBERNETES: "k3s" USING_NFD: "true" K8S_TEST_HOST_TYPE: "baremetal" steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.commit-hash }} fetch-depth: 0 - name: Rebase atop of the latest target branch run: | ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" env: TARGET_BRANCH: ${{ inputs.target-branch }} - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-tdx - name: Run tests timeout-minutes: 30 run: bash tests/integration/kubernetes/gha-run.sh run-tests - name: Delete kata-deploy if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-tdx run-k8s-tests-on-sev: strategy: fail-fast: false matrix: vmm: - qemu-sev runs-on: sev env: DOCKER_REGISTRY: ${{ inputs.registry }} DOCKER_REPO: ${{ inputs.repo }} DOCKER_TAG: ${{ inputs.tag }} PR_NUMBER: ${{ inputs.pr-number }} KATA_HYPERVISOR: ${{ matrix.vmm }} KUBECONFIG: /home/kata/.kube/config KUBERNETES: "vanilla" USING_NFD: "false" K8S_TEST_HOST_TYPE: "baremetal" steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.commit-hash }} fetch-depth: 0 - name: Rebase atop of the latest target branch run: | ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" env: TARGET_BRANCH: ${{ inputs.target-branch }} - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-sev - name: Run tests timeout-minutes: 30 run: bash tests/integration/kubernetes/gha-run.sh run-tests - name: Delete kata-deploy if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-sev run-k8s-tests-sev-snp: strategy: fail-fast: false matrix: vmm: - qemu-snp runs-on: sev-snp env: DOCKER_REGISTRY: ${{ inputs.registry }} DOCKER_REPO: ${{ inputs.repo }} DOCKER_TAG: ${{ inputs.tag }} PR_NUMBER: ${{ inputs.pr-number }} KATA_HYPERVISOR: ${{ matrix.vmm }} KUBECONFIG: /home/kata/.kube/config KUBERNETES: "vanilla" USING_NFD: "false" K8S_TEST_HOST_TYPE: "baremetal" steps: - uses: actions/checkout@v4 with: ref: ${{ inputs.commit-hash }} fetch-depth: 0 - name: Rebase atop of the latest target branch run: | ./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch" env: TARGET_BRANCH: ${{ inputs.target-branch }} - name: Deploy Kata timeout-minutes: 10 run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-snp - name: Run tests timeout-minutes: 30 run: bash tests/integration/kubernetes/gha-run.sh run-tests - name: Delete kata-deploy if: always() run: bash tests/integration/kubernetes/gha-run.sh cleanup-snp