Skip to content

GitHub Action to npm test on current versions of Node.js #1

GitHub Action to npm test on current versions of Node.js

GitHub Action to npm test on current versions of Node.js #1

Workflow file for this run

# https://docs.github.com/en/actions/use-cases-and-examples/building-and-testing/building-and-testing-nodejs
name: Node.js CI
on: [push]
jobs:
build:
strategy:
matrix:
node-version: ['18.x', '20.x', '22.x']
os: [ macos-latest, ubuntu-latest, windows-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci || npm install
- run: npm run build --if-present
- run: npm test