-
Notifications
You must be signed in to change notification settings - Fork 15
52 lines (44 loc) · 1.18 KB
/
test.yml
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
name: Test Charts
on:
push:
branches:
- main
paths-ignore:
- '**/README.md'
- '**/README.md.tmpl'
pull_request:
paths-ignore:
- '**/README.md'
- '**/README.md.tmpl'
jobs:
test:
name: Test Charts
runs-on: ubuntu-latest
steps:
# checkout
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
# prepare
- uses: actions/setup-python@v5
# setup helm
- uses: azure/setup-helm@v3.5
# setup chart testing
- uses: helm/chart-testing-action@v2.7.0
# check if charts changed
- name: Check if charts changed
id: list-changed
run: |
[ -n "$(ct list-changed)" ] && echo "changed=true" >> $GITHUB_OUTPUT || exit 0
# setup kind cluster
- uses: helm/kind-action@v1.12.0
if: steps.list-changed.outputs.changed == 'true'
# lint charts
- name: Lint charts
run: |
ct lint --config .ct/ct-lint.yml --all
# test charts
- name: Test charts
if: steps.list-changed.outputs.changed == 'true'
run: |
ct install --config .ct/ct-install.yml