name: CI

on:
  push:
    branches: ["**"]
  pull_request:

jobs:
  web:
    runs-on: aceofba-cluster
    container:
      image: ghcr.io/catthehacker/ubuntu:act-22.04
    defaults:
      run:
        working-directory: web
    steps:
      - uses: actions/checkout@v4
      - uses: pnpm/action-setup@v4
        with:
          version: 11
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: pnpm
          cache-dependency-path: web/pnpm-lock.yaml
      - run: pnpm install --frozen-lockfile
      - run: pnpm typecheck
      - run: pnpm lint
      - run: pnpm exec playwright install --with-deps chromium
      - run: pnpm test
      - run: pnpm build
      - run: pnpm check:size
      - run: pnpm check:colors
