Merge pull request #18 from amun-ai/dev #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://github.com/helm/chart-testing-action | |
name: Lint and Test Charts | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# k8s: ["1.19.16", "1.21.14", "1.22.9", "1.23.12", "1.24.7", "1.25.2"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install Helm | |
uses: azure/setup-helm@v3 | |
# as of 2022/12 the set-output still not fixed in this action | |
# https://github.com/Azure/setup-helm/issues/103 | |
with: | |
version: v3.12.1 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
check-latest: true | |
- name: Install chart-testing | |
uses: helm/chart-testing-action@v2.6.0 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) | |
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 --target-branch ${{ github.event.repository.default_branch }} --all --debug | |
- name: Create kind cluster | |
uses: helm/kind-action@v1.8.0 | |
with: | |
config: kind-config.yaml | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --config ct.yaml --target-branch ${{ github.event.repository.default_branch }} --helm-extra-args "--timeout 600s" | |
# See https://github.com/helm/chart-testing/blob/main/doc/ct_install.md |