Skip to content

Update node.js.yml

Update node.js.yml #14

Workflow file for this run

# 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" ]
merge_group:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- run: echo {{ matrix.node-version }} > .nvmrc
- name: NVM Setup Node
# You may pin to the exact commit or the version.
# uses: irby/setup-node-nvm@0f2fe973693e3657f208b039956df88e3000939d
uses: irby/[email protected]
- name: Setup pnpm
# You may pin to the exact commit or the version.
# uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2
uses: pnpm/[email protected]
with:
# If specified, run `pnpm install`
run_install: true
- run: pnpm ci
- run: pnpm test