1+ # # Reference: https://github.com/helm/chart-testing-action
12name : Linting and Testing
2-
33on : pull_request
44
55permissions :
1313 options : --user 1001
1414 steps :
1515 - name : Checkout
16- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
16+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
1717 - name : Run ah lint
1818 working-directory : ./charts
1919 run : ah lint
@@ -22,17 +22,17 @@ jobs:
2222 runs-on : ubuntu-latest
2323 steps :
2424 - name : Checkout
25- uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
25+ uses : actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
2626 with :
2727 fetch-depth : 0
2828
2929 - name : Set up Helm
30- uses : azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
30+ uses : azure/setup-helm@fe7b79cd5ee1e45176fcad797de68ecaf3ca4814 # v4.2.0
3131 with :
3232 version : v3.10.1 # Also update in publish.yaml
3333
3434 - name : Set up python
35- uses : actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7 .1
35+ uses : actions/setup-python@39cd14951b08e74b54015e9e001cdefcf80e669f # v5.1 .1
3636 with :
3737 python-version : 3.9
3838
@@ -47,14 +47,15 @@ jobs:
4747 id : list-changed
4848 run : |
4949 ## If executed with debug this won't work anymore.
50- changed=$(ct --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} list-changed)
50+ changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
5151 charts=$(echo "$changed" | tr '\n' ' ' | xargs)
5252 if [[ -n "$changed" ]]; then
5353 echo "changed=true" >> $GITHUB_OUTPUT
5454 echo "changed_charts=$charts" >> $GITHUB_OUTPUT
5555 fi
56+
5657 - name : Run chart-testing (lint)
57- run : ct lint --debug --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} -- lint-conf ./.github/configs/lintconf.yaml
58+ run : ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
5859
5960 - name : Run docs-testing (helm-docs)
6061 id : helm-docs
6768 else
6869 echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
6970 fi
71+
7072 - name : Create kind cluster
71- uses : helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8 .0
73+ uses : helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10 .0
7274 if : steps.list-changed.outputs.changed == 'true'
7375 with :
7476 config : .github/configs/kind-config.yaml
@@ -87,12 +89,14 @@ jobs:
8789 run : |
8890 ## Metrics API not available in kind cluster
8991 rm charts/argo-cd/ci/ha-autoscaling-values.yaml
92+
9093 - name : Create an external redis for ArgoCD externalRedis feature
9194 if : contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
9295 run : |
9396 kubectl create namespace redis
9497 helm repo add bitnami https://charts.bitnami.com/bitnami
9598 helm install redis bitnami/redis --wait --namespace redis --set auth.password=argocd --set architecture=standalone
99+
96100 - name : Run chart-testing (install)
97- run : ct install --config ./.github/configs/ct-install.yaml --target-branch ${{ github.base_ref }}
101+ run : ct install --config ./.github/configs/ct-install.yaml
98102 if : steps.list-changed.outputs.changed == 'true'
0 commit comments