Skip to content

feat: merge GSSoC PR #2564 by @ArshVermaGit (conflict-free) #1

feat: merge GSSoC PR #2564 by @ArshVermaGit (conflict-free)

feat: merge GSSoC PR #2564 by @ArshVermaGit (conflict-free) #1

Workflow file for this run

name: Backend CI

Check failure on line 1 in .github/workflows/backend-ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/backend-ci.yml

Invalid workflow file

(Line: 23, Col: 1): 'permissions' is already defined, (Line: 26, Col: 1): 'permissions' is already defined
on:
push:
branches:
- main
- "fix/**"
- "feat/**"
- "test/**"
- "perf/**"
- "security/**"
- "docs/**"
- "devops/**"
pull_request:
branches:
- main
- gssoc
workflow_dispatch:
permissions:
contents: read
permissions:
contents: read
permissions:
contents: read
jobs:
smoke-test:
name: Smoke Test & Unit Tests
runs-on: ubuntu-latest
env:
ALLOW_DEGRADED_STARTUP: "1"
SUPABASE_URL: "https://placeholder.supabase.co"
SUPABASE_SERVICE_KEY: "placeholder_key"
PYTHONPATH: ${{ github.workspace }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: "pip"
cache-dependency-path: "backend/requirements.txt"
- name: Install dependencies (non-ML subset for CI speed)
run: |
pip install --upgrade pip
# Install a lighter subset that still covers service imports
pip install fastapi uvicorn pydantic python-dotenv slowapi \
supabase==2.22.4 storage3==2.22.4 \
requests httpx apscheduler \
pytest pytest-cov
# Try full requirements but tolerate torch/transformers failures in CI
pip install -r backend/requirements.txt --ignore-requires-python || true
- name: Run import smoke test
run: python scripts/smoke_test.py
- name: Run unit tests with coverage
run: |
pytest backend/tests/ \
--cov=backend/services \
--cov-report=term-missing \
--cov-fail-under=60 \
-v \
--ignore=backend/tests/test_import_smoke.py \
2>&1 || true
- name: Run import smoke tests
run: pytest backend/tests/test_import_smoke.py -v 2>&1 || true