From fa5fa8d2e194b86090d647e79af3def6c9c73c05 Mon Sep 17 00:00:00 2001 From: Smile Phoenix <104746557+smilephoenix103@users.noreply.github.com> Date: Wed, 25 Jan 2023 08:34:50 -0800 Subject: [PATCH 1/2] pull_request.yml --- .github/workflows/node.js.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 0000000..848693e --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "next" ] + pull_request: + branches: [ "next" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm test From b29c6c82fbedcaf43548749c457a56407dbe0bc5 Mon Sep 17 00:00:00 2001 From: Smile Phoenix <104746557+smilephoenix103@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:02:47 -0800 Subject: [PATCH 2/2] fix(action): install NPM dependencies --- .github/workflows/node.js.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 848693e..738a8e7 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -26,4 +26,6 @@ jobs: with: node-version: ${{ matrix.node-version }} cache: 'npm' + - name: Install NPM Dependencies + run: npm install - run: npm test