Skip to content

Commit

Permalink
add helm chart testing action and ct config
Browse files Browse the repository at this point in the history
  • Loading branch information
ardelato committed Feb 7, 2024
1 parent a93c93b commit 74f1c86
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/helm.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Lint and Test Charts

on: pull_request

defaults:
run:
working-directory: helm/vigilo

jobs:
helm-lint-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.14.0

- uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: true

- name: Set up chart-testing
uses: helm/[email protected]

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ./charts/ct-config.yaml)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Run chart-testing (lint)
if: steps.list-changed.outputs.changed == 'true'
run: ct lint --config ./charts/ct-config.yaml

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

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config ./charts/ct-config.yaml
5 changes: 5 additions & 0 deletions charts/ct-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
charts-dir:
- charts
helm-extra-args: "--timeout=5m"
target-branch: main
validate-maintainers: false

0 comments on commit 74f1c86

Please sign in to comment.