# Tier 2: Integration tests — needs ffmpeg, full artdag pipeline
# Covers: artdag/test/, artdag/l1/ loose test files (non-GPU)
FROM python:3.11-slim

ENV PYTHONDONTWRITEBYTECODE=1 \
    PYTHONUNBUFFERED=1 \
    PYTHONPATH=/app

WORKDIR /app

# System deps for media processing tests
RUN apt-get update && apt-get install -y --no-install-recommends \
      ffmpeg \
      ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Python deps
COPY shared/requirements.txt ./requirements-shared.txt
RUN pip install --no-cache-dir -r requirements-shared.txt

COPY artdag/core/ ./artdag/core/
RUN pip install --no-cache-dir -e artdag/core/[all,dev]

COPY artdag/common/ ./artdag/common/
RUN pip install --no-cache-dir -e artdag/common/

COPY artdag/l1/requirements.txt ./requirements-l1.txt
RUN pip install --no-cache-dir -r requirements-l1.txt

# Copy full L1 + test suite
COPY artdag/l1/ ./artdag/l1/
COPY artdag/test/ ./artdag/test/
COPY shared/ ./shared/

CMD ["python", "-m", "pytest", \
     "artdag/test/", \
     "-v", "--tb=short", \
     "-k", "not gpu and not cuda"]
