From 185a087b271fefb229fdc570af4f4ee585da3fa0 Mon Sep 17 00:00:00 2001 From: "Juan Manuel \"Kang\" Perez" Date: Tue, 11 Jun 2024 21:36:43 +0200 Subject: [PATCH] Lint charts using next-version too --- .github/workflows/lint-and-test.yaml | 35 +++++++++++++++++----------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 0dc33f9..791a443 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -3,19 +3,6 @@ name: Lint and test PR on: pull_request jobs: - chart-lint: - name: Lint Helm charts - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Install helm/chart-testing - uses: helm/chart-testing-action@v2.6.1 - - name: Lint charts - run: ct --config .github/ct.yaml lint --all - chart-unittest: name: Unit test Helm charts runs-on: ubuntu-latest @@ -75,6 +62,26 @@ jobs: id: version uses: newrelic/release-toolkit/next-version@v1 + chart-lint: + name: Lint Helm charts + runs-on: ubuntu-latest + needs: + # Lint charts using the next version. + - changelog-checks + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + - name: Install helm/chart-testing + uses: helm/chart-testing-action@v2.6.1 + # Change version of the Helm chart to the next one so test upgrade path + - name: Set chart version to rt's next-version + run: | + yq -i '.version = "${{ needs.changelog-checks.outputs.next-version }}"' charts/stateless-dns/Chart.yaml + - name: Lint charts + run: ct --config .github/ct.yaml lint --all + chart-install: name: Installation test for Helm charts runs-on: ubuntu-latest @@ -102,7 +109,7 @@ jobs: # Change version of the Helm chart to the next one so test upgrade path - name: Set chart version to rt's next-version run: | - yq -i '.version = ${{ needs.changelog-checks.outputs.next-version }}' charts/stateless-dns/Chart.yaml + yq -i '.version = "${{ needs.changelog-checks.outputs.next-version }}"' charts/stateless-dns/Chart.yaml # Test chart installation - name: Install helm/chart-testing