-
Notifications
You must be signed in to change notification settings - Fork 31
147 lines (147 loc) · 4.72 KB
/
test.yml
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: "build-test"
on: # rebuild any PRs and main branch changes
pull_request:
types:
[ opened, synchronize, reopened ]
schedule:
# every 4 hours
- cron: "0 */4 * * *"
push:
branches:
- master
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
with:
node-version: 20
- run: |
npm ci
npm run all
__tests__/verify-no-unstaged-changes.sh
test: # make sure the action works on a clean machine without building
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
addons: ingress
# Test that nginx ingress has been enabled
- run: |
minikube addons list | grep 'ingress ' | grep enabled
test-extraOptions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
extra-config: 'kubelet.max-pods=10'
# Test that minikube max-pods extraConfig has been set
- run: |
cat ~/.minikube/profiles/minikube/config.json | jq '.KubernetesConfig.ExtraOptions[0].Key' | grep max-pods
test-insecure-registry:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
insecure-registry: '192.168.0.0/16'
# Test that minikube max-pods extraConfig has been set
- run: |
minikube ssh cat /lib/systemd/system/docker.service | grep 192.168.0.0/16
test-featureGatesOptions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
feature-gates: 'ValidatingAdmissionPolicy=true'
extra-config: 'apiserver.runtime-config=admissionregistration.k8s.io/v1alpha1'
kubernetes-version: 1.26.0
container-runtime: containerd
# Should be fine
- run: |
cat ~/.minikube/profiles/minikube/config.json | grep ValidatingAdmissionPolicy
test-none-driver:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
driver: none
- run: |
kubectl --namespace=kube-system rollout status deployment/coredns --timeout=60s --watch
# Test basic networking and DNS resolution
- run: |
kubectl run \
--attach \
--image=docker.io/busybox \
--restart=Never \
--rm \
nslookup \
-- \
nslookup kubernetes.default.svc.cluster.local
test-podman-driver:
runs-on: ubuntu-24.04
steps:
- name: Install Podman
shell: bash
run: |
lsb_release -a
sudo apt update
sudo apt install -y podman
echo "--------------------------"
podman version || true
echo "--------------------------"
podman info || true
echo "--------------------------"
podman system df || true
echo "--------------------------"
podman system info --format='{{json .}}'|| true
echo "--------------------------"
podman ps || true
echo "--------------------------"
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
driver: podman
- run: |
kubectl --namespace=kube-system rollout status deployment/coredns --timeout=60s --watch
# Test basic networking and DNS resolution
- run: |
kubectl run \
--attach \
--image=docker.io/busybox \
--restart=Never \
--rm \
nslookup \
-- \
nslookup kubernetes.default.svc.cluster.local
test-macos-docker-driver:
runs-on: macos-12
steps:
- name: setup docker
shell: bash
run: |
brew install kubernetes-cli
brew install docker
colima start
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
- uses: ./
with:
driver: docker
- run: |
kubectl --namespace=kube-system rollout status deployment/coredns --timeout=60s --watch
# Test basic networking and DNS resolution
- run: |
kubectl run \
--attach \
--image=docker.io/busybox \
--restart=Never \
--rm \
nslookup \
-- \
nslookup kubernetes.default.svc.cluster.local