From 61191f2c64ff047e39aa2e4b1cbdd4e08b2cee7e Mon Sep 17 00:00:00 2001 From: muhuchah Date: Fri, 23 Aug 2024 13:59:35 +0330 Subject: [PATCH 1/3] chore(cicd): add lint-test.yml --- .github/workflows/lint-test.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/lint-test.yml diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml new file mode 100644 index 0000000..d99cb77 --- /dev/null +++ b/.github/workflows/lint-test.yml @@ -0,0 +1,27 @@ +name: Lint and Test Charts + +on: pull_request + +jobs: + lint-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v1 + + - name: Run chart-testing (lint) + id: lint + uses: helm/chart-testing-action@v1.0.0-alpha.3 + with: + command: lint + + - name: Create kind cluster + uses: helm/kind-action@v1.0.0-alpha.3 + with: + install_local_path_provisioner: true + if: steps.lint.outputs.changed == 'true' + + - name: Run chart-testing (install) + uses: helm/chart-testing-action@v1.0.0-alpha.3 + with: + command: install From 9741dce79221d39db24d7b19205b70fba4efe919 Mon Sep 17 00:00:00 2001 From: Mohammad Hussein Chahkandi <100763223+muhuchah@users.noreply.github.com> Date: Sat, 24 Aug 2024 09:30:45 +0330 Subject: [PATCH 2/3] chore(ci/cd): Update lint-test.yml --- .github/workflows/lint-test.yml | 62 +++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index d99cb77..fcf4f05 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -3,25 +3,43 @@ name: Lint and Test Charts on: pull_request jobs: - lint-test: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v1 - - - name: Run chart-testing (lint) - id: lint - uses: helm/chart-testing-action@v1.0.0-alpha.3 - with: - command: lint - - - name: Create kind cluster - uses: helm/kind-action@v1.0.0-alpha.3 - with: - install_local_path_provisioner: true - if: steps.lint.outputs.changed == 'true' - - - name: Run chart-testing (install) - uses: helm/chart-testing-action@v1.0.0-alpha.3 - with: - command: install + 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@v4.2.0 + with: + version: v3.14.4 + + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.7.0 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }}) + if [[ -n "$changed" ]]; then + echo "changed=true" >> "$GITHUB_OUTPUT" + fi + + - name: Run chart-testing (lint) + if: steps.list-changed.outputs.changed == 'true' + run: ct lint --target-branch ${{ github.event.repository.default_branch }} + + - name: Create kind cluster + if: steps.list-changed.outputs.changed == 'true' + uses: helm/kind-action@v1.10.0 + + - name: Run chart-testing (install) + if: steps.list-changed.outputs.changed == 'true' + run: ct install --target-branch ${{ github.event.repository.default_branch }} From 138399be06d4fb49cc7686e3ea6be33853572c77 Mon Sep 17 00:00:00 2001 From: Mohammad Hussein Chahkandi <100763223+muhuchah@users.noreply.github.com> Date: Sat, 24 Aug 2024 09:33:43 +0330 Subject: [PATCH 3/3] chore(ci/cd): update chart-testing-action version --- .github/workflows/lint-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index fcf4f05..700984d 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -22,7 +22,7 @@ jobs: check-latest: true - name: Set up chart-testing - uses: helm/chart-testing-action@v2.7.0 + uses: helm/chart-testing-action@v2.6.1 - name: Run chart-testing (list-changed) id: list-changed