diff --git a/backend/tests/Dockerfile.test b/backend/tests/Dockerfile.test index 374e1b2..a3ed0e0 100644 --- a/backend/tests/Dockerfile.test +++ b/backend/tests/Dockerfile.test @@ -2,16 +2,18 @@ FROM python:3.9-slim WORKDIR /app -# Install dependencies from backend/requirements.txt -COPY ../backend/requirements.txt /app/requirements.txt +# Install dependencies from requirements.txt +COPY ../requirements.txt /app/requirements.txt RUN pip install --no-cache-dir -r requirements.txt -# Install coverage (if not in requirements.txt) +# Install coverage (if not included in requirements.txt) RUN pip install --no-cache-dir coverage -# Copy application code and tests into the container -COPY ../backend /app/backend -COPY . /app/tests +# Copy the entire backend folder into the container +COPY .. /app/backend + +# Set the working directory to the backend folder +WORKDIR /app/backend # Run tests with coverage CMD ["bash", "-c", "pytest --cov=backend --cov-report=xml"]