Skip to content

Commit

Permalink
fix chart-testing action
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Li <joseph.t.lee@outlook.com>
  • Loading branch information
eahydra committed Apr 7, 2022
1 parent 7955bec commit 846846d
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,24 @@ jobs:

- name: Setup Chart Linting
id: lint
uses: helm/chart-testing-action@v2.1.0
uses: helm/chart-testing-action@v2.2.1

- name: List changed charts
- name: Run chart-testing (list-changed)
id: list-changed
run: |
## If executed with debug this won't work anymore.
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
echo "::set-output name=changed_charts::$charts"
fi
- name: Run chart-testing (lint)
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
run: ct lint --debug --target-branch ${{ github.event.repository.default_branch }} --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml

- name: Create kind cluster
uses: helm/kind-action@v1.2.0
if: steps.list-changed.outputs.changed == 'true'
with:
config: .github/configs/kind-config.yaml
- name: Skip HPA tests of ArgoCD
if: contains(steps.list-changed.outputs.changed_charts, 'koordinator')
run: |
## Metrics API not available in kind cluster
rm charts/argo-cd/ci/ha-autoscaling-values.yaml

- name: Run chart-testing (install)
run: ct install --config ./.github/configs/ct-install.yaml
run: ct install --target-branch ${{ github.event.repository.default_branch }} --config ./.github/configs/ct-install.yaml
if: steps.list-changed.outputs.changed == 'true'

0 comments on commit 846846d

Please sign in to comment.