-
Notifications
You must be signed in to change notification settings - Fork 4
112 lines (97 loc) · 3.27 KB
/
Copy pathe2e.yaml
File metadata and controls
112 lines (97 loc) · 3.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
name: e2e
on:
pull_request:
push:
branches:
- main
- master
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
timeout-minutes: 45
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: 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
e2e-kata:
runs-on: ubuntu-latest
timeout-minutes: 60
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