* Use helm-docs for argo-workflows Signed-off-by: Tuan Anh Tran <me@tuananh.org> * bump version and update changelog Signed-off-by: Tuan Anh Tran <me@tuananh.org> * ci: add step to check if docs is staled and needs update Signed-off-by: Tuan Anh Tran <me@tuananh.org> * docs: run helm-docs to generate readme Signed-off-by: Tuan Anh Tran <me@tuananh.org> * Add missing parameter documentation Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Add .helmdocsignore for charts which not yet use helm-docs Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> * Do not exclude argocd-notifications anymore Signed-off-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com> Co-authored-by: Marco Kilchhofer <mkilchhofer@users.noreply.github.com>
67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
## Reference: https://github.com/helm/chart-testing-action
|
|
---
|
|
name: Linting and Testing
|
|
on: pull_request
|
|
jobs:
|
|
chart-test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@v1
|
|
|
|
- name: Set up python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Setup Chart Linting
|
|
id: lint
|
|
uses: helm/chart-testing-action@v2.1.0
|
|
|
|
- name: List changed charts
|
|
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)
|
|
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
|
|
|
|
- name: Run docs-testing (helm-docs)
|
|
uses: buttahtoast/helm-release-action@v2.0.1
|
|
with:
|
|
charts: "${{ steps.list-changed.outputs.changed_charts }}"
|
|
if: steps.list-changed.outputs.changed == 'true'
|
|
|
|
- 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: Deploy latest ArgoCD CRDs when testing ArgoCD extensions
|
|
if: |
|
|
contains(steps.list-changed.outputs.changed_charts, 'argocd-applicationset') ||
|
|
contains(steps.list-changed.outputs.changed_charts, 'argocd-image-updater') ||
|
|
contains(steps.list-changed.outputs.changed_charts, 'argocd-notifications')
|
|
run: |
|
|
kubectl apply -f charts/argo-cd/crds
|
|
|
|
- name: Skip HPA tests of ArgoCD
|
|
if: contains(steps.list-changed.outputs.changed_charts, 'argo-cd')
|
|
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
|
|
if: steps.list-changed.outputs.changed == 'true'
|