name: CI on: push: branches: [ main ] pull_request: branches: [ main ] jobs: backend: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v4 with: python-version: '3.10' - name: Install backend dependencies run: | if [ -f backend/requirements.txt ]; then python -m pip install --upgrade pip pip install -r backend/requirements.txt else echo "No backend/requirements.txt found, skipping install" fi - name: Sanity check - compile Python files run: python -m compileall backend - name: Run tests if present run: | if [ -d backend/tests ]; then python -m pip install pytest pytest -q else echo "No tests found; skipping pytest" fi