name: gate

on:
  push:
  pull_request:

permissions:
  contents: read

jobs:
  gate:
    runs-on: ubuntu-latest
    timeout-minutes: 10
    steps:
      - uses: actions/checkout@v7
      - uses: pnpm/action-setup@v6
        with:
          version: 11.20.0
          run_install: false
      - uses: actions/setup-node@v7
        with:
          node-version: 22
          cache: pnpm
      - name: Install Wayland native build dependencies
        run: sudo apt-get update && sudo apt-get install -y build-essential pkg-config libei-dev libpipewire-0.3-dev libspa-0.2-dev libglib2.0-dev libpng-dev libxkbcommon-dev
      - run: pnpm install --frozen-lockfile
      - run: pnpm typecheck
      - run: pnpm test
      - run: pnpm build
      - run: pnpm gate
