Merge FunkyPenguin's Changes #137
Workflow file for this run
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
name: Lint and Test Charts | |
on: | |
# push: | |
# paths: | |
# - 'charts/**' | |
# - '.github/**' | |
pull_request: | |
paths: | |
- 'charts/**' | |
- '.github/**' | |
workflow_dispatch: | |
env: | |
KUBE_SCORE_VERSION: 1.17.0 | |
HELM_VERSION: v3.13.2 | |
concurrency: | |
group: ${{ github.head_ref }} | |
cancel-in-progress: true | |
jobs: | |
lint-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: ${{ env.HELM_VERSION }} | |
- name: Set up kube-score | |
run: | | |
mkdir /tmp/bin | |
wget https://github.com/zegl/kube-score/releases/download/v${{ env.KUBE_SCORE_VERSION }}/kube-score_${{ env.KUBE_SCORE_VERSION }}_linux_amd64 -O /tmp/bin/kube-score | |
chmod 755 /tmp/bin/kube-score | |
- name: Kube-score generated manifests | |
env: | |
KUBE_SCORE: /tmp/bin/kube-score | |
run: .ci/scripts/kube-score.sh | |
chart-testing: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Choose from https://hub.docker.com/r/kindest/node/tags | |
KubeVersion: [1.27.3, 1.28.0, 1.29.0] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# python is a requirement for the chart-testing action below (supports yamllint among other tests) | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.0 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .ci/ct-config.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "::set-output name=changed::true" | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config .ci/ct-config.yaml | |
- name: Create ${{matrix.KubeVersion}} kind cluster | |
uses: helm/kind-action@v1.5.0 | |
with: | |
node_image: kindest/node:v${{matrix.KubeVersion}} | |
cluster_name: kubernetes-${{matrix.KubeVersion}} | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) against ${{matrix.KubeVersion}} | |
run: ct install --config .ci/ct-config.yaml |