name: CI

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

jobs:
  api-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: "3.12"
      - name: Install API dependencies
        run: pip install -r api/requirements.txt
      - name: Import API app
        run: python -c "from app.main import app; print(app.title, app.version)"
        working-directory: api

  frontend-check:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Verify frontend files
        run: test -f frontend/index.html && test -f frontend/app.js && test -f frontend/style.css
