| 1 | name: Node CI |
| 2 | on: [push, pull_request] |
| 3 | jobs: |
| 4 | build: |
| 5 | runs-on: ${{ matrix.os }} |
| 6 | strategy: |
| 7 | matrix: |
| 8 | os: [ubuntu-latest, ubuntu-22.04] |
| 9 | node-version: [18.x, 20.x, 22.x] |
| 10 | exclude: |
| 11 | - os: ubuntu-22.04 |
| 12 | node-version: 18.x |
| 13 | max-parallel: 4 |
| 14 | steps: |
| 15 | - uses: actions/checkout@v4 |
| 16 | - name: Use Node.js ${{ matrix.node-version }} |
| 17 | uses: actions/setup-node@v4 |
| 18 | with: |
| 19 | node-version: ${{ matrix.node-version }} |
| 20 | cache: npm |
| 21 | - run: npm ci |
| 22 | - run: npm run build --if-present |
| 23 | - run: npm test |