Skip to content

Update node.js.yml

Update node.js.yml #6

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
- name: NVM Setup Node
# You may pin to the exact commit or the version.
# uses: irby/setup-node-nvm@0f2fe973693e3657f208b039956df88e3000939d
uses: irby/[email protected]
with:
# Install specific version of Node using NVM. If omitted, it will use the .nvmrc value at your project root (if available) or fall back to the value in .nvmrc for this action.
node-version: {{ matrix.node-version }}

Check failure on line 31 in .github/workflows/node.js.yml

View workflow run for this annotation

GitHub Actions / Node.js CI

Invalid workflow file

The workflow is not valid. .github/workflows/node.js.yml (Line: 31, Col: 23): A mapping was not expected
- 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