From f97450ae505a1c8647c515d8f49cfe860d7e119c Mon Sep 17 00:00:00 2001 From: Thiago Valentim <51245643+thiagomini@users.noreply.github.com> Date: Sat, 2 Dec 2023 10:36:34 -0300 Subject: [PATCH 1/2] chore: create node-ci.yml closes #3 --- .github/workflows/node-ci.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node-ci.yml diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml new file mode 100644 index 0000000..9be3896 --- /dev/null +++ b/.github/workflows/node-ci.yml @@ -0,0 +1,31 @@ +# 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: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.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: 'yarn' # Change cache to yarn + - name: Install Yarn + run: npm install -g yarn + - run: yarn install --immutable # Replace npm ci with yarn install + - run: yarn build --if-present # Replace npm run build with yarn build + - run: yarn test # Replace npm test with yarn test + - run: yarn lint # Add this line to run linter From ae40dabce0e995a9e520f42e5c2677f7dbc6d7ed Mon Sep 17 00:00:00 2001 From: Thiago Valentim <51245643+thiagomini@users.noreply.github.com> Date: Sat, 2 Dec 2023 10:38:27 -0300 Subject: [PATCH 2/2] chore: remove build step --- .github/workflows/node-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/node-ci.yml b/.github/workflows/node-ci.yml index 9be3896..82f497b 100644 --- a/.github/workflows/node-ci.yml +++ b/.github/workflows/node-ci.yml @@ -26,6 +26,5 @@ jobs: - name: Install Yarn run: npm install -g yarn - run: yarn install --immutable # Replace npm ci with yarn install - - run: yarn build --if-present # Replace npm run build with yarn build - - run: yarn test # Replace npm test with yarn test - - run: yarn lint # Add this line to run linter + - run: yarn test + - run: yarn lint