Skip to content

Update build matrix to Node 20.x and 21.x #516

Update build matrix to Node 20.x and 21.x

Update build matrix to Node 20.x and 21.x #516

Workflow file for this run

on: [push]
name: build
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["20.x", "21.x"]
name: Node.js ${{ matrix.node }}
steps:
- uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: |
npm ci
node ./node_modules/elm/install.js
- name: Audit signatures
run: npm audit signatures
- name: Generate intermediate files
run: |
# By compiling both `Main.elm` and `Worker.elm`, we make sure all
# intermediate files are present before the next steps run.
#
# Otherwise, parcel would compile both files in parallel which can
# lead to data races and let one of the compiler processes fail with
# an error about corrupt files.
npx elm make app/elm/Main.elm --output /dev/null
npx elm make app/elm/Worker.elm --output /dev/null
- name: Run tests
run: npm test
- name: Build assets
run: npm run prod
- name: Check formatting
run: |
npx elm-format --validate app/elm tests
npx prettier --check "app/js/*.js"