Skip to content

Commit

Permalink
Configure CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Jul 23, 2023
1 parent b3df3cf commit a64ab38
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Lint and Test Charts

on: pull_request

jobs:
lint-test:
runs-on: ubuntu-latest
env:
CT_TARGET_BRANCH: ${{ github.base_ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

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

- uses: actions/setup-python@v4
with:
python-version: "3.9"
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0

- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ct.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 ct.yaml

- name: Create kind cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.7.0

- name: Run chart-testing (install)
if: steps.list-changed.outputs.changed == 'true'
run: ct install --config ct.yaml
5 changes: 5 additions & 0 deletions ct.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# See https://github.com/helm/chart-testing#configuration
chart-dirs:
- charts
chart-repos:
- bitnami=https://charts.bitnami.com/bitnami

0 comments on commit a64ab38

Please sign in to comment.