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 be47f90 commit 9912c53
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions backend/tests/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 9912c53

Please sign in to comment.