-
Notifications
You must be signed in to change notification settings - Fork 7
48 lines (41 loc) · 1.58 KB
/
pr-checks.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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')
run: |
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