name: Frontend CI

on:
  push:
    paths:
      - "apps/web-frontend/**"
      - ".github/workflows/frontend-ci.yml"
  pull_request:
    paths:
      - "apps/web-frontend/**"
      - ".github/workflows/frontend-ci.yml"

jobs:
  test:
    runs-on: ubuntu-latest

    defaults:
      run:
        working-directory: apps/web-frontend

    steps:
      - uses: actions/checkout@v4

      - name: Set up Node
        uses: actions/setup-node@v4
        with:
          node-version: "20"

      - name: Install pnpm
        run: npm install -g pnpm

      - name: Install dependencies
        run: pnpm install

      - name: Run tests
        run: pnpm test

