-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.53 KB
/
helm-charts-test.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
name: "helm-charts/test"
on: pull_request
jobs:
kubernetes-versions:
runs-on: ubuntu-latest
steps:
- id: release
uses: actions-matrix/release-matrix-action@v2
with:
search: "kubernetes"
outputs:
matrix: ${{ steps.release.outputs.matrix }}
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch history
run: git fetch --prune --unshallow
- name: Install Chart Tester
uses: helm/[email protected]
- name: Lint charts
id: lint
run: ct lint --all --target-branch ${{ github.event.repository.default_branch }}
test:
runs-on: ubuntu-latest
needs:
- lint
- kubernetes-versions
strategy:
fail-fast: false
matrix:
k8s: ${{ fromJson(needs.kubernetes-versions.outputs.matrix).version }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch history
run: git fetch --prune --unshallow
- name: Create kind cluster
uses: helm/[email protected]
with:
installLocalPathProvisioner: true # Only build a kind cluster if there are chart changes to test.
node_image: "kindest/node:v${{ matrix.k8s }}.0"
config: etc/kind.yaml
- run: kubectl get nodes
- name: Install Chart Tester
uses: helm/[email protected]
- name: Test charts
run: ct install --config ct.yaml --target-branch ${{ github.event.repository.default_branch }}