Skip to content

Update e2e workflow and runtime configurations #9

Update e2e workflow and runtime configurations

Update e2e workflow and runtime configurations #9

Workflow file for this run

name: e2e
on:
pull_request:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h /
- name: Install kind
run: |
curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind version
- name: Install kubectl
run: |
curl -fsSL -o ./kubectl "https://dl.k8s.io/release/$(curl -fsSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
- name: Deploy SandboxFleet to kind
env:
WORKER_RUNTIME: gvisor
APPLY_SAMPLES: "0"
run: ./hack/deploy-kind.sh
- name: Run e2e tests
run: ./hack/verify-e2e.sh
- name: Collect e2e diagnostics
if: failure()
run: ./hack/collect-e2e-logs.sh
- name: Upload e2e diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-logs-gvisor
path: bin/e2e-logs/
if-no-files-found: ignore
e2e-kata:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
df -h /
- name: Enable KVM device permissions
id: kvm
run: |
if [[ ! -e /dev/kvm ]]; then
echo "available=false" >> "$GITHUB_OUTPUT"
echo "/dev/kvm missing; skipping nested-virt e2e"
exit 0
fi
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' \
| sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
if ! docker run --rm --device /dev/kvm busybox true; then
echo "available=false" >> "$GITHUB_OUTPUT"
echo "/dev/kvm not usable from Docker; skipping"
exit 0
fi
echo "available=true" >> "$GITHUB_OUTPUT"
- name: Install kind
if: steps.kvm.outputs.available == 'true'
run: |
curl -fsSL -o ./kind "https://kind.sigs.k8s.io/dl/v0.27.0/kind-linux-amd64"
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
kind version
- name: Install kubectl
if: steps.kvm.outputs.available == 'true'
run: |
curl -fsSL -o ./kubectl "https://dl.k8s.io/release/$(curl -fsSL https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
- name: Deploy SandboxFleet (kata)
if: steps.kvm.outputs.available == 'true'
env:
WORKER_RUNTIME: kata
APPLY_SAMPLES: "0"
CLUSTER_NAME: sandboxfleet-kata
ENSURE_NESTED_VIRT: "1"
run: ./hack/deploy-kind.sh
- name: Run e2e tests (kata)
if: steps.kvm.outputs.available == 'true'
env:
CLUSTER_NAME: sandboxfleet-kata
run: ./hack/verify-e2e.sh
- name: Collect e2e diagnostics
if: failure() && steps.kvm.outputs.available == 'true'
env:
CLUSTER_NAME: sandboxfleet-kata
run: ./hack/collect-e2e-logs.sh
- name: Upload e2e diagnostics
if: failure() && steps.kvm.outputs.available == 'true'
uses: actions/upload-artifact@v4
with:
name: e2e-logs-kata
path: bin/e2e-logs/
if-no-files-found: ignore