From 0d248e8522ac57066028c827dc0c818d004962ed Mon Sep 17 00:00:00 2001 From: Mark Davison Date: Tue, 26 Apr 2022 12:05:17 +0100 Subject: [PATCH 1/3] Add yarn build to pipeline to ensure it will be possible to build post merge --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4a88cd56..7b1454bf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [main] jobs: - build: + test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -14,10 +14,11 @@ jobs: node-version: '14' cache: 'yarn' - run: yarn install --frozen-lockfile + - run: yarn build - run: yarn test deploy: - needs: build + needs: test runs-on: ubuntu-latest environment: production steps: From 25255a728405fad8b2665b255122022126bbbe05 Mon Sep 17 00:00:00 2001 From: Mark Davison Date: Tue, 26 Apr 2022 12:12:06 +0100 Subject: [PATCH 2/3] Add missing on step to workflow --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7b1454bf..ffe1d786 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,11 +1,11 @@ name: CI -on: - push: - branches: [main] jobs: test: + on: + pull_request: + branches: [main] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -18,6 +18,9 @@ jobs: - run: yarn test deploy: + on: + push: + branches: [main] needs: test runs-on: ubuntu-latest environment: production From e7022eb53595f298117483bc6db30f7690fd9203 Mon Sep 17 00:00:00 2001 From: Mark Davison Date: Tue, 26 Apr 2022 12:12:54 +0100 Subject: [PATCH 3/3] Run test on opening a PR to any branch --- .github/workflows/ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffe1d786..48000fba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,9 +3,7 @@ name: CI jobs: test: - on: - pull_request: - branches: [main] + on: [pull_request] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2