From 13e6d3aa799a4492a62f642e4732462c237a0f12 Mon Sep 17 00:00:00 2001 From: Ben Blackmore Date: Wed, 1 Feb 2023 14:48:58 +0100 Subject: [PATCH] ci: merge chart linting steps into ci.yml --- .github/workflows/chart-testing.yaml | 47 ---------------------------- .github/workflows/ci.yml | 28 ++++++++++++++++- README.md | 1 + 3 files changed, 28 insertions(+), 48 deletions(-) delete mode 100644 .github/workflows/chart-testing.yaml diff --git a/.github/workflows/chart-testing.yaml b/.github/workflows/chart-testing.yaml deleted file mode 100644 index f8828b6..0000000 --- a/.github/workflows/chart-testing.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: Lint and Test Helm Charts - -on: pull_request - -jobs: - lint-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Set up Helm - uses: azure/setup-helm@v3 - with: - version: v3.8.1 - - # Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and - # yamllint (https://github.com/adrienverge/yamllint) which require Python - - name: Set up Python - uses: actions/setup-python@v2 - with: - python-version: 3.7 - - - name: Set up chart-testing - uses: helm/chart-testing-action@v2.3.1 - with: - version: v3.5.1 - - - name: Run chart-testing (list-changed) - id: list-changed - run: | - changed=$(ct list-changed --config ct.yaml) - if [[ -n "$changed" ]]; then - echo "::set-output name=changed::true" - fi - - - name: Run chart-testing (lint) - run: ct lint --config ct.yaml - - - name: Create kind cluster - uses: helm/kind-action@v1.2.0 - if: steps.list-changed.outputs.changed == 'true' - - - name: Run chart-testing (install) - run: ct install --config ct.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f49d05c..f0d12eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,7 +78,7 @@ jobs: platforms: linux/amd64,linux/arm64 test-helm-charts: - name: "Unit Test Helm Charts" + name: "Test Helm Charts" runs-on: ubuntu-latest needs: - build-images @@ -108,6 +108,32 @@ jobs: - name: Run unit tests run: make charttesting + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.3.1 + with: + version: v3.5.1 + + - name: Run chart-testing (list-changed) + id: list-changed + if: github.event_name == 'pull_request' + run: | + changed=$(ct list-changed --config ct.yaml) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + fi + + - name: Run chart-testing (lint) + run: ct lint --config chartTesting.yaml + if: github.event_name == 'pull_request' + + - name: Create kind cluster + uses: helm/kind-action@v1.2.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Run chart-testing (install) + run: ct install --config chartTesting.yaml + + release-helm-chart: name: "Release Helm Chart" runs-on: ubuntu-latest diff --git a/README.md b/README.md index db750d1..7ddfb77 100755 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ - add PERSONAL_ACCESS_TOKEN_USED_BY_CLA_FROM_ANSGAR as secret if you want to use the CLA support - Docker image published where/how/how to make the image publicly accessible - Helm chart + - when are image tags set ## Getting started