From f9d61abf4eab6cc15d9fd2c7c1059afadfda3eb9 Mon Sep 17 00:00:00 2001 From: Jeremy Denquin Date: Thu, 15 Feb 2024 16:56:35 +0100 Subject: [PATCH] misc(CI): Add CI --- .github/workflows/chart-testing.yml | 39 +++++++++++++++++++++++++++++ examples/ci/values.yml | 2 ++ 2 files changed, 41 insertions(+) create mode 100644 .github/workflows/chart-testing.yml create mode 100644 examples/ci/values.yml diff --git a/.github/workflows/chart-testing.yml b/.github/workflows/chart-testing.yml new file mode 100644 index 0000000..f3d2de3 --- /dev/null +++ b/.github/workflows/chart-testing.yml @@ -0,0 +1,39 @@ +on: pull_request + +name: Lint and Test Charts + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Helm + uses: azure/setup-helm@v3 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.7 + + - name: Set up chart-testing + uses: helm/chart-testing-action@v2 + + - name: Run chart-testing (list-changed) + id: list-changed + run: | + changed=$(ct list-changed) + if [[ -n "$changed" ]]; then + echo "{changed}={true}" >> $GITHUB_OUTPUT + fi + + - name: Run chart-testing (lint) + run: ct lint + + - name: Create Kind cluster + uses: helm/kind-action@v1 + if: ${{ needs.list-changed.outputs.changed }} == 'true' + + - name: Run chart-testing (install) + run: ct install \ No newline at end of file diff --git a/examples/ci/values.yml b/examples/ci/values.yml new file mode 100644 index 0000000..5659a80 --- /dev/null +++ b/examples/ci/values.yml @@ -0,0 +1,2 @@ +frontUrl: https://foobar.dev +apiUrl: https://foobar.dev \ No newline at end of file