1- # # Reference: https://github.com/helm/chart-testing-action
21name : Linting and Testing
2+
33on : pull_request
44
55permissions :
@@ -26,24 +26,23 @@ jobs:
2626
2727 - name : Setup Chart Linting
2828 id : lint
29- 29+ 3030 with :
3131 # Note: Also update in scripts/lint.sh
32- version : v3.7.1
32+ version : v3.7.0
3333
3434 - name : List changed charts
3535 id : list-changed
3636 run : |
3737 ## If executed with debug this won't work anymore.
38- changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
38+ changed=$(ct --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} list-changed)
3939 charts=$(echo "$changed" | tr '\n' ' ' | xargs)
4040 if [[ -n "$changed" ]]; then
4141 echo "::set-output name=changed::true"
4242 echo "::set-output name=changed_charts::$charts"
4343 fi
44-
4544 - name : Run chart-testing (lint)
46- run : ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
45+ run : ct lint --debug --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} -- lint-conf ./.github/configs/lintconf.yaml
4746
4847 - name : Run docs-testing (helm-docs)
4948 id : helm-docs
@@ -56,35 +55,23 @@ jobs:
5655 else
5756 echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
5857 fi
59-
6058 - name : Create kind cluster
61- uses : helm/kind-action@v1.5 .0
59+ uses : helm/kind-action@v1.4 .0
6260 if : steps.list-changed.outputs.changed == 'true'
6361 with :
6462 config : .github/configs/kind-config.yaml
6563
66- - name : Deploy latest ArgoCD CRDs when testing ArgoCD extensions
67- if : |
68- contains(steps.list-changed.outputs.changed_charts, 'argocd-image-updater') ||
69- contains(steps.list-changed.outputs.changed_charts, 'argocd-apps')
70- run : |
71- helm repo add dandydeveloper https://dandydeveloper.github.io/charts/
72- helm dependency build charts/argo-cd/
73- helm template charts/argo-cd/ --set server.extensions.enabled=true -s templates/crds/* | kubectl apply -f -
74-
7564 - name : Skip HPA tests of ArgoCD
7665 if : contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
7766 run : |
7867 ## Metrics API not available in kind cluster
7968 rm charts/argo-cd/ci/ha-autoscaling-values.yaml
80-
8169 - name : Create an external redis for ArgoCD externalRedis feature
8270 if : contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
8371 run : |
8472 kubectl create namespace redis
8573 helm repo add bitnami https://charts.bitnami.com/bitnami
8674 helm install redis bitnami/redis --wait --namespace redis --set auth.password=argocd --set architecture=standalone
87-
8875 - name : Run chart-testing (install)
89- run : ct install --config ./.github/configs/ct-install.yaml
90- if : steps.list-changed.outputs.changed == 'true'
76+ run : ct install --config ./.github/configs/ct-install.yaml --target-branch ${{ github.base_ref }}
77+ if : steps.list-changed.outputs.changed == 'true'
0 commit comments