name: UI - Tests

on:
  push:
    branches: ["**"]

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ui
    steps:
      - name: Checkout source code
        uses: actions/checkout@v4

      - name: Setup Bun
        uses: oven-sh/setup-bun@v2
        with:
          bun-version: "1.3.11"

      - name: Install dependencies
        run: bun install

      - name: Run unit tests
        run: bun run test:unit -- --run
        env:
          PUBLIC_API_URL: "https://api.example.com"
