name: TypeScript Check

on:
  pull_request:
    types: [opened, reopened, edited]

jobs:
  # Test job
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Install Node
        uses: actions/setup-node@v4
        with:
          node-version: 20.x

      - name: Install Dependencies
        run: |
          yarn install

      - name: Build Project
        run: |
          node .github/scripts/generate-metadata.js
          yarn tsc --noEmit
