fix(ci): build the helm dependencies before linting and testing

The `charts` directory is ignored by git, so a fresh checkout does not contain the postgresql, postgresql-ha and valkey
sub-charts. Locally the workflow appeared to work because `make helm/dependency-update` had populated the directory at
some earlier point.

Without the sub-charts every suite that asserts on a dependency template failed with "document index 0 is out of range"
and "template gitea/charts/postgresql/templates/primary/svc.yaml not exists or not selected in test suite". `helm lint`
was affected for the same reason.

`helm dependency build` is used instead of `helm dependency update`, because `Chart.lock` is committed and the pinned
versions should be resolved reproducibly rather than refreshed on every run.

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-09-14 20:32:37 +02:00
co-authored by Copilot
parent 552fe8c56e
commit 010256397a
+4
View File
@@ -18,6 +18,8 @@ jobs:
- uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
with: with:
version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm
- name: Build helm dependencies
run: helm dependency build
- name: Lint helm files - name: Lint helm files
run: | run: |
helm lint --values values.yaml . helm lint --values values.yaml .
@@ -33,5 +35,7 @@ jobs:
HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest
name: Install helm-unittest name: Install helm-unittest
run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest
- name: Build helm dependencies
run: helm dependency build
- name: Execute helm unittests - name: Execute helm unittests
run: helm unittest --strict --file 'unittests/**/*.yaml' . run: helm unittest --strict --file 'unittests/**/*.yaml' .