From d7555c29409fba1c846b9de4ce1d041b258e1145 Mon Sep 17 00:00:00 2001 From: Garima Ketan Chauhan Date: Wed, 2 Apr 2025 23:13:07 +0200 Subject: [PATCH] Update Dockerfile.test --- backend/tests/Dockerfile.test | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/tests/Dockerfile.test b/backend/tests/Dockerfile.test index 7f6e47c..0080fea 100644 --- a/backend/tests/Dockerfile.test +++ b/backend/tests/Dockerfile.test @@ -2,7 +2,7 @@ FROM python:3.11-slim # Set environment variables -ENV PYTHONUNBUFFERED=1 +ENV PYTHONUNBUFFERED=1 # Set the working directory WORKDIR /app @@ -10,12 +10,12 @@ WORKDIR /app # Install system dependencies (if needed) RUN apt-get update && apt-get install -y gcc libpq-dev && rm -rf /var/lib/apt/lists/* -# Copy dependencies file and install them -COPY ../requirements.txt . -RUN pip install --no-cache-dir -r requirements.txt coverage +# Copy the requirements file into the container and install dependencies +COPY ../../requirements.txt /app/requirements.txt +RUN pip install --no-cache-dir -r /app/requirements.txt coverage -# Copy the Django project -COPY ../ . +# Copy the Django project (assuming you want the whole backend code) +COPY ../../ /app/ # Run Django tests with coverage CMD ["sh", "-c", "coverage run --source=. manage.py test && coverage report -m && coverage html"]