# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: ci
on:
  pull_request:
  push:
    branches:
      - master
  workflow_dispatch:
jobs:
  ci:
    strategy:
      fail-fast: false
      matrix:
        node-version: ['20.x', '24.x', 'lts/*']
        os: [macos-latest, ubuntu-latest, ubuntu-24.04-arm, windows-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v6
      - uses: actions/setup-node@v6
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - run: npm audit
      - run: npm run lint
      # - run: npm run update-crosswalk  # To support newer versions of Node.js
      - run: npm run build --if-present
      - run: npm test
