name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.12'

      - name: Install uv
        uses: astral-sh/setup-uv@v4

      - name: Install dependencies
        run: uv pip install --system -e ".[dev]"

      - name: Run tests
        run: uv run pytest tests/

  # build-dashboard:
  #   runs-on: ubuntu-latest
  #   steps:
  #     - uses: actions/checkout@v4
  #     - uses: actions/setup-node@v4
  #       with:
  #         node-version: '22'
  #     - name: Build dashboards
  #       run: |
  #         for dir in dashboards/*/; do
  #           echo "Building $dir"
  #           cd "$dir" && npm ci && npm run build && cd -
  #         done
