name: CI Smoke Checks

on:
  pull_request:
  push:
    branches:
      - main
  workflow_dispatch:

jobs:
  sayhello-build-run:
    name: Sayhello Build and Run
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: "3.12"

      - name: Install uv
        run: python -m pip install --upgrade pip uv

      - name: Sync Python dependencies
        run: uv sync

      - name: Build sayhello pipeline
        run: uv run ultrarag build examples/experiments/sayhello.yaml

      - name: Run sayhello pipeline
        run: uv run ultrarag run examples/experiments/sayhello.yaml

  frontend-build:
    name: Frontend Build
    runs-on: ubuntu-latest
    defaults:
      run:
        working-directory: ui/frontend
    steps:
      - name: Checkout
        uses: actions/checkout@v5

      - name: Set up Node.js
        uses: actions/setup-node@v5
        with:
          node-version: "24"

      - name: Install frontend dependencies
        run: npm ci

      - name: Build frontend
        run: npm run build
