name: Pull Requests

on:
  pull_request:
    branches: [master, pre, develop]
jobs:
  build:
    name: Test & Build PR
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: "20.x"
      - name: Install PNPM
        run: npm i -g pnpm
      - name: Install dependencies
        run: pnpm install --frozen-lockfile
      - name: Run Tests
        run: pnpm test
      - name: Build Package
        run: pnpm build
