name: CI - Quality Assurance

on:
  pull_request:

jobs:
  qa:
    name: 🧪 QA
    runs-on: docker
    container:
      image: catthehacker/ubuntu:act-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: 20
      - name: Setup pnpm
        uses: pnpm/action-setup@v3
        with:
          version: 10
      - name: 🔐 Registry Auth
        run: |
          echo "@mintel:registry=https://${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}" > .npmrc
          echo "//${{ vars.REGISTRY_HOST || 'npm.infra.mintel.me' }}/:_authToken=${{ secrets.REGISTRY_PASS }}" >> .npmrc
      - name: Install dependencies
        run: pnpm install --frozen-lockfile
      - name: 🧪 Parallel Checks
        run: |
          pnpm lint &
          pnpm build &
          wait
