fix: Add numpy and pillow to CI build validation step
Some checks failed
CI / skip-ci-check (pull_request) Successful in 1m31s
CI / lint-and-type-check (pull_request) Successful in 2m20s
CI / python-lint (pull_request) Successful in 1m59s
CI / test-backend (pull_request) Successful in 4m7s
CI / build (pull_request) Failing after 1m57s
CI / secret-scanning (pull_request) Successful in 1m40s
CI / dependency-scan (pull_request) Successful in 1m38s
CI / sast-scan (pull_request) Successful in 3m9s
CI / workflow-summary (pull_request) Successful in 1m29s

The backend validation step was failing because numpy is required for
importing backend.services.face_service, which is imported at module level.
Adding numpy and pillow to the pip install command in the build job to
fix the ModuleNotFoundError.
This commit is contained in:
Tanya 2026-01-09 12:16:54 -05:00
parent 0ca9adcd47
commit 08e0fc8966

View File

@ -426,7 +426,9 @@ jobs:
python3 -m venv /tmp/backend-venv
# Use venv's pip and python directly (avoids shell activation issues)
/tmp/backend-venv/bin/pip install --no-cache-dir fastapi uvicorn pydantic sqlalchemy psycopg2-binary redis rq python-jose python-multipart python-dotenv bcrypt
# Install core dependencies including numpy and pillow (needed for module-level imports)
# Skip heavy ML dependencies (tensorflow, deepface, opencv) for faster builds
/tmp/backend-venv/bin/pip install --no-cache-dir fastapi uvicorn pydantic sqlalchemy psycopg2-binary redis rq python-jose python-multipart python-dotenv bcrypt numpy pillow
# Set environment variables for validation
export PYTHONPATH=$(pwd)