name: ci

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  ci:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4
      - run: corepack enable
      - uses: actions/setup-node@v3
        with:
          node-version: 20
          cache: 'pnpm'

      - name: Install dependencies
        run: pnpm i

      - name: Run linters
        run: pnpm lint

      - name: Run unit test
        run: pnpm test

      - name: Type check
        run: pnpm typecheck

      - name: Build the app
        run: pnpm build
