From 8d1996d18eac6f7548d91e7972c5a4cae48dc109 Mon Sep 17 00:00:00 2001 From: Nguyen Huu Kim <13513658+kimyvgy@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:02:52 +0700 Subject: [PATCH 1/3] chore(ci): Build on push --- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cdfd9af --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,27 @@ +name: CI tests + +on: + workflow_dispatch: + push: + +jobs: + ci-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: ⎔ Setup node + uses: actions/setup-node@v4 + with: + node-version: '20.x' + registry-url: 'https://registry.npmjs.org' + - name: ⎔ Cache node_modules + uses: actions/cache@v3 + env: + cache-name: node_modules-20x + with: + path: node_modules + key: ${{ runner.os }}-build-${{ env.cache-name }} + - name: 📥 Download deps + run: yarn install --frozen-lockfile + - name: ⎔ Build package + run: yarn build From 21b5b56ef25c9e0d75785ab9ad8711640655d144 Mon Sep 17 00:00:00 2001 From: Nguyen Huu Kim <13513658+kimyvgy@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:11:36 +0700 Subject: [PATCH 2/3] chore(ci): Run `build` on PR --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cdfd9af..a5fd30b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,9 @@ name: CI tests on: workflow_dispatch: push: + pull_request: + branches: + - master jobs: ci-test: From e384c09e4fdf53f5218ae7e9510a76ec8c6c0e1a Mon Sep 17 00:00:00 2001 From: Nguyen Huu Kim <13513658+kimyvgy@users.noreply.github.com> Date: Thu, 14 Dec 2023 15:15:05 +0700 Subject: [PATCH 3/3] chore: Only run `build` for push event on `master` branch --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a5fd30b..fabe194 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,8 @@ name: CI tests on: workflow_dispatch: push: + branches: + - master pull_request: branches: - master