From ab331bdc746d60d14541155849b9a9577e7c3400 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Jun 2024 19:34:55 +0000 Subject: [PATCH 1/2] chore(deps): update actions/checkout action to v4 --- .github/workflows/lint-and-test.yaml | 8 ++++---- .github/workflows/publish-charts.yaml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index 58a7734..d74f6f4 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install helm-unittest plugin run: helm plugin install https://github.com/helm-unittest/helm-unittest - name: Run unit tests @@ -37,7 +37,7 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -75,7 +75,7 @@ jobs: - changelog-checks steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install helm/chart-testing @@ -99,7 +99,7 @@ jobs: if: ${{ needs.changelog-checks.outputs.skip-release != 'true' }} steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Install Minikube to test chart installation - name: Install Minikube diff --git a/.github/workflows/publish-charts.yaml b/.github/workflows/publish-charts.yaml index eba45f8..d8984df 100644 --- a/.github/workflows/publish-charts.yaml +++ b/.github/workflows/publish-charts.yaml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 From 41ec5ef586375e4bfdfa890d3865001994c5b3fe Mon Sep 17 00:00:00 2001 From: "Juan Manuel \"Kang\" Perez" Date: Tue, 18 Jun 2024 21:40:49 +0200 Subject: [PATCH 2/2] fix pipeline if the release is empty --- .github/workflows/lint-and-test.yaml | 41 +++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/.github/workflows/lint-and-test.yaml b/.github/workflows/lint-and-test.yaml index d74f6f4..5193a3b 100644 --- a/.github/workflows/lint-and-test.yaml +++ b/.github/workflows/lint-and-test.yaml @@ -8,24 +8,6 @@ on: workflow_dispatch: jobs: - chart-unittest: - name: Unit test Helm charts - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - - name: Install helm-unittest plugin - run: helm plugin install https://github.com/helm-unittest/helm-unittest - - name: Run unit tests - run: | - for chart in charts/*; do - if [ -d "$chart/tests/" ]; then - helm unittest $chart -3 - else - echo "::warning file=$chart,title=Skipping unit test for $chart::$chart does not have a tests/ folder" - fi - done - changelog-checks: name: Test changelog correctness and get next-version runs-on: ubuntu-latest @@ -67,12 +49,33 @@ jobs: id: version uses: newrelic/release-toolkit/next-version@v1 + chart-unittest: + name: Unit test Helm charts + runs-on: ubuntu-latest + needs: + - changelog-checks + if: ${{ needs.changelog-checks.outputs.skip-release != 'true' }} + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Install helm-unittest plugin + run: helm plugin install https://github.com/helm-unittest/helm-unittest + - name: Run unit tests + run: | + for chart in charts/*; do + if [ -d "$chart/tests/" ]; then + helm unittest $chart -3 + else + echo "::warning file=$chart,title=Skipping unit test for $chart::$chart does not have a tests/ folder" + fi + done + chart-lint: name: Lint Helm charts runs-on: ubuntu-latest needs: - # Lint charts using the next version. - changelog-checks + if: ${{ needs.changelog-checks.outputs.skip-release != 'true' }} steps: - name: Checkout code uses: actions/checkout@v4