mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-07-14 22:06:46 +00:00
We've been pinning a specific version of k0s for CRI-O tests, which may make sense for CRI-O, but doesn't make sense at all when it comes to testing that we can install kata-deploy on latest k0s (and currently our test for that is broken). Let's bump to the latest, and from this point we start debugging, instead of debugging on an ancient version of the project. Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
116 lines
3.4 KiB
YAML
116 lines
3.4 KiB
YAML
name: CI | Run kubernetes tests on amd64
|
|
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: ""
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
run-k8s-tests-amd64:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
vmm:
|
|
- clh #cloud-hypervisor
|
|
- dragonball
|
|
- fc #firecracker
|
|
- qemu
|
|
- cloud-hypervisor
|
|
container_runtime:
|
|
- containerd
|
|
snapshotter:
|
|
- devmapper
|
|
k8s:
|
|
- k3s
|
|
include:
|
|
- vmm: qemu
|
|
container_runtime: crio
|
|
snapshotter: ""
|
|
k8s: k0s
|
|
runs-on: ubuntu-22.04
|
|
env:
|
|
DOCKER_REGISTRY: ${{ inputs.registry }}
|
|
DOCKER_REPO: ${{ inputs.repo }}
|
|
DOCKER_TAG: ${{ inputs.tag }}
|
|
GH_PR_NUMBER: ${{ inputs.pr-number }}
|
|
KATA_HYPERVISOR: ${{ matrix.vmm }}
|
|
KUBERNETES: ${{ matrix.k8s }}
|
|
KUBERNETES_EXTRA_PARAMS: ${{ matrix.container_runtime != 'crio' && '' || '--cri-socket remote:unix:///var/run/crio/crio.sock --kubelet-extra-args --cgroup-driver="systemd"' }}
|
|
SNAPSHOTTER: ${{ matrix.snapshotter }}
|
|
USING_NFD: "false"
|
|
K8S_TEST_HOST_TYPE: all
|
|
CONTAINER_RUNTIME: ${{ matrix.container_runtime }}
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ inputs.commit-hash }}
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- 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: Configure CRI-O
|
|
if: matrix.container_runtime == 'crio'
|
|
run: bash tests/integration/kubernetes/gha-run.sh setup-crio
|
|
|
|
- name: Deploy ${{ matrix.k8s }}
|
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-k8s
|
|
env:
|
|
CONTAINER_RUNTIME: ${{ matrix.container_runtime }}
|
|
|
|
- name: Configure the ${{ matrix.snapshotter }} snapshotter
|
|
if: matrix.snapshotter != ''
|
|
run: bash tests/integration/kubernetes/gha-run.sh configure-snapshotter
|
|
|
|
- name: Deploy Kata
|
|
timeout-minutes: 10
|
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata
|
|
|
|
- name: Install `bats`
|
|
run: bash tests/integration/kubernetes/gha-run.sh install-bats
|
|
|
|
- name: Run tests
|
|
timeout-minutes: 30
|
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
|
|
|
- name: Collect artifacts ${{ matrix.vmm }}
|
|
if: always()
|
|
run: bash tests/integration/kubernetes/gha-run.sh collect-artifacts
|
|
continue-on-error: true
|
|
|
|
- name: Archive artifacts ${{ matrix.vmm }}
|
|
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
|
with:
|
|
name: k8s-tests-${{ matrix.vmm }}-${{ matrix.snapshotter }}-${{ matrix.k8s }}-${{ inputs.tag }}
|
|
path: /tmp/artifacts
|
|
retention-days: 1
|
|
|
|
- name: Delete kata-deploy
|
|
if: always()
|
|
timeout-minutes: 5
|
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup
|