Skip to content

Commit

Permalink
CI: Use chart-testing-action 2.0.0 (jenkinsci#132)
Browse files Browse the repository at this point in the history
* use chart-testing-action 2.0.0 (jenkinsci#122)

- run chart testing without docker container
- use helm 3.4.0
- use fetch-depth during checkout to retrive the history

Signed-off-by: Torsten Walter <[email protected]>

* configure additional commands

Signed-off-by: Torsten Walter <[email protected]>
  • Loading branch information
torstenwalter authored Nov 14, 2020
1 parent 726988f commit 603dcdc
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 13 deletions.
46 changes: 33 additions & 13 deletions .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,44 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Fetch history
run: git fetch --prune --unshallow
- name: Set up Helm
uses: azure/setup-helm@v1
with:
version: v3.4.0

- name: Run chart-testing (lint)
id: lint
uses: helm/[email protected]
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7

- name: Set up chart-testing
uses: helm/[email protected]
with:
command: lint
config: ct.yaml
image: twalter/chart-testing:v3.1.1-unittest
version: v3.3.0

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.yaml)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: install helm unittests
if: steps.list-changed.outputs.changed == 'true'
run: |
helm env
helm plugin install https://github.com/quintush/helm-unittest
- name: Run chart-testing (lint)
run: ct lint --config ct.yaml

- name: Create kind cluster
uses: helm/[email protected]
if: steps.lint.outputs.changed == 'true'
if: steps.list-changed.outputs.changed == 'true'

- name: Run chart-testing (install)
uses: helm/[email protected]
with:
command: install
config: ct.yaml
run: ct install --config ct.yaml
2 changes: 2 additions & 0 deletions ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ target-branch: main
chart-dirs:
- charts
helm-extra-args: --timeout 600s
additional-commands:
- helm unittest -f tests/*.yaml {{ .Path }}

0 comments on commit 603dcdc

Please sign in to comment.