Skip to content

Add CI matrix testing for Node.js 20 and 22 #16

Description

@PAMulligan

Description

The CI workflow currently runs on a single Node.js version. Add a matrix strategy to test against both Node.js 20 (LTS) and Node.js 22 (current LTS) to ensure compatibility.

Why

Nerva targets both Cloudflare Workers (which uses a V8 isolate) and Node.js deployments. Testing against multiple Node.js versions catches compatibility issues early and gives users confidence that their chosen Node version is supported. The templates reference Node 22 (alpine), but many production environments still run Node 20.

Acceptance Criteria

  • Update .github/workflows/ci.yml to use a matrix strategy
  • Test on Node.js 20.x and 22.x
  • Ensure pnpm is installed correctly on both versions (via corepack)
  • Both matrix entries must pass for CI to be green
  • CI passes

Implementation

strategy:
  matrix:
    node-version: [20, 22]

steps:
  - uses: actions/checkout@v4
  - uses: actions/setup-node@v4
    with:
      node-version: ${{ matrix.node-version }}
  - run: corepack enable
  - run: pnpm install

Metadata

Metadata

Assignees

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions