-
Notifications
You must be signed in to change notification settings - Fork 885
68 lines (57 loc) · 1.8 KB
/
lint-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
# validate any chart changes under charts directory
name: Chart Lint
env:
HELM_VERSION: v3.8.1
KIND_VERSION: v0.14.0
KIND_NODE_IMAGE: kindest/node:v1.26.0
K8S_VERSION: v1.23.4
on:
push:
pull_request:
paths:
- "charts/karmada/**"
jobs:
chart-lint-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: ${{ env.HELM_VERSION }}
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and
# yamllint (https://github.com/adrienverge/yamllint) which require Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
architecture: x64
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.2.1
with:
version: v3.6.0
- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$( ct list-changed )
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --debug --check-version-increment=false
- name: Create kind cluster
uses: helm/kind-action@v1.2.0
if: steps.list-changed.outputs.changed == 'true'
with:
wait: 120s
version: ${{ env.KIND_VERSION }}
node_image: ${{ env.KIND_NODE_IMAGE }}
kubectl_version: ${{ env.K8S_VERSION }}
- name: Run chart-testing (install)
run: ct install --debug --helm-extra-args "--timeout 800s"