name: Check

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

jobs:
  check:
    runs-on: ubuntu-latest
    
    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - uses: pnpm/action-setup@v4
        name: Install pnpm

      - name: Install Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 22.19
          cache: 'pnpm'
            
      - name: Install dependencies
        run: pnpm install --frozen-lockfile
        
      - name: Sync
        run: pnpm run sync
        
      - name: Lint
        run: pnpm run lint

      - name: Check GQL
        run: pnpm run gql:check

      - name: Check Svelte and TypeScript
        run: pnpm run check