Skip to content

Commit

Permalink
update lint-and-test
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-codefresh committed Jul 29, 2024
1 parent 13af6ce commit 92f055f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Reference: https://github.com/helm/chart-testing-action
name: Linting and Testing

on: pull_request

permissions:
Expand Down Expand Up @@ -47,14 +47,15 @@ jobs:
id: list-changed
run: |
## If executed with debug this won't work anymore.
changed=$(ct --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} list-changed)
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
if [[ -n "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "changed_charts=$charts" >> $GITHUB_OUTPUT
fi
- name: Run chart-testing (lint)
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --target-branch ${{ github.base_ref }} --lint-conf ./.github/configs/lintconf.yaml
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml

- name: Run docs-testing (helm-docs)
id: helm-docs
Expand All @@ -67,6 +68,7 @@ jobs:
else
echo -e '\033[0;32mDocumentation up to date\033[0m ✔'
fi
- name: Create kind cluster
uses: helm/kind-action@0025e74a8c7512023d06dc019c617aa3cf561fde # v1.10.0
if: steps.list-changed.outputs.changed == 'true'
Expand All @@ -87,12 +89,14 @@ jobs:
run: |
## Metrics API not available in kind cluster
rm charts/argo-cd/ci/ha-autoscaling-values.yaml
- name: Create an external redis for ArgoCD externalRedis feature
if: contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
run: |
kubectl create namespace redis
helm repo add bitnami https://charts.bitnami.com/bitnami
helm install redis bitnami/redis --wait --namespace redis --set auth.password=argocd --set architecture=standalone
- name: Run chart-testing (install)
run: ct install --config ./.github/configs/ct-install.yaml --target-branch ${{ github.base_ref }}
run: ct install --config ./.github/configs/ct-install.yaml
if: steps.list-changed.outputs.changed == 'true'

0 comments on commit 92f055f

Please sign in to comment.