-
Notifications
You must be signed in to change notification settings - Fork 476
56 lines (48 loc) · 1.58 KB
/
charts--run-tests.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
name: "test charts"
on:
pull_request:
branches:
- main
paths:
- "charts/**"
jobs:
lint_and_install:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Helm
uses: azure/[email protected]
with:
version: v3.9.0
- name: Install chart-testing
uses: helm/[email protected]
with:
version: v3.6.0
- name: List Changed Charts (chart-testing)
id: list-changed
run: |
CHANGED=$(ct list-changed --config ct-config.yaml)
if [[ -n "$CHANGED" ]]; then
echo "::set-output name=CHANGED::true"
fi
- name: Lint Charts (chart-testing)
if: ${{ steps.list-changed.outputs.CHANGED == 'true' }}
run: |
ct lint --config ct-config.yaml --check-version-increment=false
- name: Create kind Cluster
# specific commit is used because no tagged version includes `kubectl_version` feature
uses: helm/kind-action@deab45fc8df9de5090a604e8ec11778eea7170bd
if: ${{ steps.list-changed.outputs.CHANGED == 'true' }}
timeout-minutes: 5
with:
version: v0.14.0
kubectl_version: v1.24.0
node_image: kindest/node:v1.24.0@sha256:0866296e693efe1fed79d5e6c7af8df71fc73ae45e3679af05342239cdc5bc8e
wait: 300s
- name: Install Charts (chart-testing)
if: ${{ steps.list-changed.outputs.CHANGED == 'true' }}
run: |
ct install --config ct-config.yaml