name: Run Biome

on:
  pull_request:
  workflow_call:
    inputs:
      GH_TOKEN:
        required: false
        type: string

concurrency:
  group: ${{ github.workflow }}-format-${{ github.ref }}
  cancel-in-progress: true

jobs:
  code-quality:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Setup environment
        uses: ./.github/setup
  
      - name: Run lint
        run: bun lint

      - name: Run format
        run: bun format