name: Test

on:
  pull_request:
  workflow_call:

permissions:
  contents: read

jobs:
  run-tests:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
        with:
          bun-version: "latest"
      - name: Run Bun install and build
        run: |
          bun install --frozen-lockfile
          bun run build
