-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (75 loc) · 2.04 KB
/
test_chart.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
name: Test Chart
on:
pull_request:
env:
helm-version: "v3.12.2"
kubeconform-version: "v0.16.1"
jobs:
kubeconform-chart:
name: Validate chart on ${{ matrix.k8s }}
runs-on: ubuntu-latest
strategy:
matrix:
k8s:
- v1.25.16
- v1.26.15
- v1.27.16
- v1.28.13
- v1.29.8
- v1.30.4
- v1.31.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
- name: Run kubeconform
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
run: .github/kubeconform.sh
test-chart:
name: Test Helm Chart ${{ matrix.k8s }}
runs-on: ubuntu-latest
needs:
- kubeconform-chart
strategy:
matrix:
k8s:
- v1.25.16
- v1.26.15
- v1.27.16
- v1.28.13
- v1.29.8
- v1.30.4
- v1.31.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
check-latest: true
- name: Set up chart-testing
uses: helm/chart-testing-action@v2
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Create kind ${{ matrix.k8s }} cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1
with:
node_image: kindest/node:${{ matrix.k8s }}
kubectl_version: ${{ matrix.k8s }}
- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --target-branch ${{ github.event.repository.default_branch }}