Run the test workflow on explicit Node version 18, 20, 22, and 24 instead of the changing alias LTS/latest.
33 lines
799 B
YAML
33 lines
799 B
YAML
name: Test Build
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-24.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
node: [ "18", "20", "22", "24" ]
|
|
name: Node ${{ matrix.node.name }}
|
|
env:
|
|
CI: true
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
- name: Setup node v${{ matrix.node }}
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: ${{ matrix.node }}
|
|
- run: npm install
|
|
- run: npm run build:all
|
|
- name: Archive production artifacts
|
|
uses: actions/upload-artifact@v7
|
|
with:
|
|
name: dist-node-v${{ matrix.node }}
|
|
path: dist
|
|
retention-days: 30
|
|
- run: NODE_ENV=development npm run test:e2e
|
|
- run: NODE_ENV=production npm run test:e2e
|