Skip to content

Commit

Permalink
Update Dockerfile.test
Browse files Browse the repository at this point in the history
  • Loading branch information
Garima Ketan Chauhan authored and GitHub Enterprise committed Apr 2, 2025
1 parent 77a99b0 commit d7555c2
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend/tests/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
FROM python:3.11-slim

# Set environment variables
ENV PYTHONUNBUFFERED=1
ENV PYTHONUNBUFFERED=1

# Set the working directory
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"]

0 comments on commit d7555c2

Please sign in to comment.