name: CI validation for web UI

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  js:
    runs-on: ubuntu-24.04
    env:
      DETECT_CHROMEDRIVER_VERSION: true
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: '20'
      - name: run tests
        run: |
          npm ci
          npm run lint
          npm run test
          npm run test:e2e
        working-directory: ./gerbera-web
