Skip to content

Commit 92f055f

Browse files
update lint-and-test
1 parent 13af6ce commit 92f055f

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
## Reference: https://github.com/helm/chart-testing-action
12
name: Linting and Testing
2-
33
on: pull_request
44

55
permissions:
@@ -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
@@ -67,6 +68,7 @@ jobs:
6768
else
6869
echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
6970
fi
71+
7072
- name: Create kind cluster
7173
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
7274
if: steps.list-changed.outputs.changed == 'true'
@@ -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

Comments
 (0)