Support for higher versions of k8s #114
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: Pull Request checker | |
on: pull_request | |
jobs: | |
lint-test: | |
strategy: | |
matrix: | |
k8s: [1.14.10, 1.16.15, 1.17.17, 1.18.19,1.19.11, 1.20.7, 1.21.10, 1.22.7, 1.29.8] | |
runs-on: ubuntu-latest | |
env: | |
CT_CHART_DIRS: charts | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Fetch history | |
run: git fetch --prune --unshallow | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- 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: Modify values.yaml for k8s < 1.19 | |
uses: mikefarah/[email protected] | |
if: startsWith(matrix.k8s, '1.18') || startsWith(matrix.k8s, '1.17') || startsWith(matrix.k8s, '1.16') || startsWith(matrix.k8s, '1.15') || startsWith(matrix.k8s, '1.14') | |
with: | |
cmd: | | |
echo "Setting betaApiVersion to true for Kubernetes version ${{ matrix.k8s }}" | |
yq e '.autoscaling.betaApiVersion = true' -i charts/newrelic-php-daemon/values.yaml | |
- name: Run chart-testing (lint) | |
run: ct lint | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
# Only build a kind cluster if there are chart changes to test. | |
if: steps.list-changed.outputs.changed == 'true' | |
with: | |
node_image: kindest/node:v${{ matrix.k8s }} | |
cluster_name: k8s-${{ matrix.k8s }} | |
- name: Run chart-testing (install with condition) | |
run: ct install |