From 09c4e24777e074148311821e61b85165107f743e Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Thu, 17 Feb 2022 13:02:28 +0530 Subject: [PATCH 1/5] Avoid running CI twice on pull-requests push event without a branch filter causes CI to run twice on PRs since the pull_request event and a push event to the PR's branch are both triggerred. --- .github/workflows/ci.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1af9e765..26a22952 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,5 +1,9 @@ name: Lint and Test Chart -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: jobs: lint-test: From 5c3a12fc5be75a557d248cb7b91deccdf68cc31a Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Thu, 17 Feb 2022 13:04:02 +0530 Subject: [PATCH 2/5] Remove un-needed Python setup --- .github/workflows/ci.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 26a22952..fc37387a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,9 +19,6 @@ jobs: uses: azure/setup-helm@v1 with: version: v3.4.0 - - uses: actions/setup-python@v2 - with: - python-version: 3.7 - name: Set up chart-testing uses: helm/chart-testing-action@v2.0.1 - name: Run chart-testing (lint) From b4b4d9fe63eacfd9b6e1e3451480b0c973ef1c31 Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Thu, 17 Feb 2022 13:13:18 +0530 Subject: [PATCH 3/5] Separate lint and test jobs Even if linting fails we'd still want to get to know the results of installing the chart. --- .github/workflows/ci.yaml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fc37387a..d075cb58 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,21 @@ on: pull_request: jobs: - lint-test: + lint: + runs-on: ubuntu-latest + steps: + - name: Cleanup node + uses: AutoModality/action-clean@1.1.0 + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up chart-testing + uses: helm/chart-testing-action@v2.0.1 + - name: Lint charts + run: ct lint --charts=charts/trino --validate-maintainers=false + + test: runs-on: ubuntu-latest steps: - name: Cleanup node @@ -21,9 +35,7 @@ jobs: version: v3.4.0 - name: Set up chart-testing uses: helm/chart-testing-action@v2.0.1 - - name: Run chart-testing (lint) - run: ct lint --charts=charts/trino --validate-maintainers=false - name: Create kind cluster uses: helm/kind-action@v1.2.0 - - name: Run chart-testing (install) + - name: Install charts run: ct install --charts=charts/trino From c86043dccd5cb9395ad6e17c66218f8f66d0817c Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Thu, 17 Feb 2022 21:48:48 +0530 Subject: [PATCH 4/5] Rename workflow to CI --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d075cb58..841e1008 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Lint and Test Chart +name: CI on: push: branches: From 3a8e5bb7d5c706b31196bd0e9194a47137519180 Mon Sep 17 00:00:00 2001 From: Ashhar Hasan Date: Thu, 17 Feb 2022 21:49:18 +0530 Subject: [PATCH 5/5] Fix sync-readme workflow since chart README was moved --- .github/workflows/sync-readme.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync-readme.yaml b/.github/workflows/sync-readme.yaml index aadee3d8..39bd69e6 100644 --- a/.github/workflows/sync-readme.yaml +++ b/.github/workflows/sync-readme.yaml @@ -5,7 +5,7 @@ on: branches: - main paths: - - 'README.md' + - '**/README.md' jobs: sync-readme: