Skip to content
This repository was archived by the owner on Feb 9, 2022. It is now read-only.

Commit c812753

Browse files
authored
Merge pull request #3 from tf-controller/ci
Add lint and test ci
2 parents 6f5b6b4 + 95fdcf1 commit c812753

File tree

3 files changed

+49
-1
lines changed

3 files changed

+49
-1
lines changed

.github/workflows/lint-test.yaml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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: Set up Helm
15+
uses: azure/setup-helm@v1
16+
with:
17+
version: 3.*
18+
19+
- uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.7
22+
23+
- name: Set up chart-testing
24+
uses: helm/chart-testing-action@v2.1.0
25+
26+
- name: Run chart-testing (list-changed)
27+
id: list-changed
28+
run: |
29+
changed=$(ct list-changed --config ct.yaml)
30+
if [[ -n "$changed" ]]; then
31+
echo "::set-output name=changed::true"
32+
fi
33+
34+
- name: Run chart-testing (lint)
35+
run: ct lint --config ct.yaml
36+
if: steps.list-changed.outputs.changed == 'true'
37+
38+
- name: Create kind cluster
39+
uses: helm/kind-action@v1.2.0
40+
if: steps.list-changed.outputs.changed == 'true'
41+
42+
- name: Run chart-testing (install)
43+
run: ct install --config ct.yaml
44+
if: steps.list-changed.outputs.changed == 'true'

charts/tf-controller/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ apiVersion: v2
22
name: tf-controller
33
description: A Helm chart for TF-controller
44
type: application
5-
version: 0.0.1
5+
version: 0.0.2
66
appVersion: "0.7.0"

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+
target-branch: main
4+
validate-maintainers: false

0 commit comments

Comments
 (0)