name: tests
on: [push, pull_request]
permissions:
  contents: read

# Cancel superseded runs on the same ref (e.g. rapid pushes to a branch) so CI
# only spends minutes on the latest commit.
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v7
    - uses: actions/setup-node@v6
      with:
        node-version: 24
        cache: npm
    - run: npm ci
    - run: npm run fmt
    - run: npm run lint
    - run: npm run lint:css
    - run: npm run lint:params
    - run: npm run typecheck
    - run: npm test
    - run: npm run build
