Files
helm-charts/.github/workflows/lint-test.yaml
2025-10-01 17:25:00 +01:00

59 lines
1.5 KiB
YAML

name: Lint and Test Charts
on: pull_request
env:
K8S_VERSION: 1.22
HELM_VERSION: 3.9.2
PYTHON_VERSION: 3.11
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Install Helm
uses: azure/setup-helm@v4
with:
version: "v${{ env.HELM_VERSION }}"
- uses: actions/setup-python@v6
with:
python-version: "${{ env.PYTHON_VERSION }}"
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.7.0
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed)
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --config .github/ct.yaml
- name: Create k8s Kind Cluster
uses: helm/kind-action@v1.12.0
if: steps.list-changed.outputs.changed == 'true'
- name: Remove node taints
run: |
kubectl taint --all=true nodes node.cloudprovider.kubernetes.io/uninitialized- || true
if: steps.list-changed.outputs.changed == 'true'
- name: Install CRDs
run: |
cat crds/*.yaml | kubectl apply -f -
if: steps.list-changed.outputs.changed == 'true'
- name: Run chart-testing (install)
run: ct install --config .github/ct.yaml
if: steps.list-changed.outputs.changed == 'true'