Skip to content

[pull] master from docker-mailserver:master #14

[pull] master from docker-mailserver:master

[pull] master from docker-mailserver:master #14

name: Lint and Test Charts
on:
# push:
# paths:
# - 'charts/**'
# - '.github/**'
pull_request:
paths:
- 'charts/**'
- '.github/**'
workflow_dispatch:
env:
KUBE_SCORE_VERSION: 1.12.0
HELM_VERSION: v3.4.1
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
jobs:
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v1
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.24.15,1.25.11,1.26.6,1.27.3,1.28.0]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# python is a requirement for the chart-testing action below (supports yamllint among other tests)
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Set up chart-testing
uses: helm/[email protected]
- 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/[email protected]
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