forked from nolar/setup-k3d-k3s
-
Notifications
You must be signed in to change notification settings - Fork 0
108 lines (99 loc) · 2.69 KB
/
ci.yaml
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
name: CI
on:
push:
branches:
- v[0-9]+
pull_request:
branches:
- v[0-9]+
workflow_dispatch: {}
jobs:
test-latest:
name: Install latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
- run: kubectl version
test-specific:
strategy:
fail-fast: false
matrix:
k3s: [v1.25.3+k3s1, v1.25.3, v1.25, v1]
name: Install ${{ matrix.k3s }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: ${{ matrix.k3s }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- run: kubectl version
test-outputs:
name: Check outputs
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: latest
github-token: ${{ secrets.GITHUB_TOKEN }}
id: install
- run: echo K3S=${K3S} K8S=${K8S}
env:
K3S: ${{ steps.install.outputs.k3s-version }}
K8S: ${{ steps.install.outputs.k8s-version }}
test-skip-creation:
name: Skip creation
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-creation: true
test-skip-readiness:
name: Skip readiness
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
skip-readiness: true
- run: kubectl version
test-multi-cluster:
name: Multi-cluster
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: v1.24
k3d-name: 1-24
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: v1.25
k3d-name: 1-25
- run: kubectl version --context k3d-1-24
- run: kubectl version --context k3d-1-25
test-custom-tag:
name: Custom K3d tag
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: v1.25
k3d-tag: v5.4.1
- run: k3d --version
test-custom-args:
name: Custom args
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: ./ # normally: nolar/setup-k3d-k3s@v1
with:
version: v1.25
k3d-args: --servers 2 --no-lb
- run: kubectl get nodes # there must be two of them