name: CI

on:
  push:
  pull_request:

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
      - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
        with:
          node-version: 22
          cache: npm
          cache-dependency-path: |
            package-lock.json
            ui/package-lock.json
      - name: Install dependencies
        run: |
          npm ci
          npm --prefix ui ci
      - name: Build
        run: npm run build:all -- --skip-python
      - name: Test
        run: npm test
