diff --git a/.gitea/workflows/helm.yaml b/.gitea/workflows/helm.yaml new file mode 100644 index 0000000..820cf67 --- /dev/null +++ b/.gitea/workflows/helm.yaml @@ -0,0 +1,37 @@ +name: Helm + +on: + pull_request: + types: [ "opened", "reopened", "synchronize" ] + push: + branches: + - '**' + tags-ignore: + - '**' + workflow_dispatch: {} + +jobs: + helm-lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm + - name: Lint helm files + run: | + helm lint --values values.yaml . + + helm-unittest: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0 + - uses: azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1 + with: + version: v4.3.0 # renovate: datasource=github-releases depName=helm/helm + - env: + HELM_UNITTEST_VERSION: v1.0.0 #renovate: datasource=github-releases depName=helm-unittest/helm-unittest + name: Install helm-unittest + run: helm plugin install --verify=false --version "${HELM_UNITTEST_VERSION}" https://github.com/helm-unittest/helm-unittest + - name: Execute helm unittests + run: helm unittest --strict --file 'unittests/**/*.yaml' . diff --git a/.gitea/workflows/test-pr.yml b/.gitea/workflows/test-pr.yml deleted file mode 100644 index 21a75bb..0000000 --- a/.gitea/workflows/test-pr.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: check-and-test - -on: - pull_request: - branches: - - "*" - push: - branches: - - main - -env: - # renovate: datasource=github-releases depName=helm-unittest/helm-unittest - HELM_UNITTEST_VERSION: "v1.1.1" - -jobs: - check-and-test: - runs-on: ubuntu-latest - container: docker.io/alpine/helm:4.2.3 - steps: - - name: install tools - run: | - apk update - apk add --update bash make nodejs npm yamllint ncurses - - uses: actions/checkout@v7.0.0 - - name: define helm repositories - run: | - helm repo add bitnami https://charts.bitnami.com/bitnami - helm repo add valkey https://valkey.io/valkey-helm - helm repo update - - name: install chart dependencies - run: helm dependency build - - name: lint - run: helm lint . - - name: template - run: helm template --debug gitea-helm . - - name: prepare unit test environment - run: | - helm plugin install --verify=false --version ${{ env.HELM_UNITTEST_VERSION }} https://github.com/helm-unittest/helm-unittest - git submodule update --init --recursive - - name: unit tests - env: - TERM: xterm - run: | - make unittests - - name: verify readme - run: | - make readme - git diff --exit-code --name-only README.md - - name: yaml lint - uses: https://github.com/ibiqlik/action-yamllint@v3