Skip to content

Commit 449a37e

Browse files
committed
setup Helm lint github action
1 parent cdcb64c commit 449a37e

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/lint-test.yaml

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Lint and Test Charts
2+
3+
on: pull_request
4+
5+
jobs:
6+
lint-test:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v2
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Install Helm
15+
uses: azure/setup-helm@v1
16+
17+
- uses: actions/setup-python@v2
18+
with:
19+
python-version: 3.7
20+
21+
- name: Install chart-testing
22+
uses: helm/[email protected]
23+
24+
- name: Run chart-testing (list-changed)
25+
id: list-changed
26+
run: |
27+
changed=$(ct list-changed)
28+
if [[ -n "$changed" ]]; then
29+
echo "::set-output name=changed::true"
30+
fi
31+
32+
- name: Run chart-testing (lint)
33+
run: ct lint
34+
35+
- name: Create kind cluster
36+
uses: helm/[email protected]
37+
if: steps.list-changed.outputs.changed == 'true'
38+
39+
- name: Run chart-testing (install)
40+
run: ct install

ct.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# See https://github.com/helm/chart-testing#configuration
2+
remote: origin
3+
chart-dirs:
4+
- charts

0 commit comments

Comments
 (0)