forked from mathialm/secfit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Garima Ketan Chauhan
authored and
GitHub Enterprise
committed
Apr 2, 2025
1 parent
7f700f9
commit 03d5807
Showing
1 changed file
with
11 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,14 +1,17 @@ | ||
| # Use a base Python image | ||
| FROM python:3.9-slim | ||
|
|
||
| # Set the working directory in the container | ||
| WORKDIR /app | ||
|
|
||
| # Copy the application code into the container | ||
| COPY . /app | ||
| # Install dependencies from backend/requirements.txt | ||
| COPY ../backend/requirements.txt /app/requirements.txt | ||
| RUN pip install --no-cache-dir -r requirements.txt | ||
|
|
||
| # Install dependencies (including coverage) | ||
| RUN pip install --no-cache-dir -r requirements.txt && pip install --no-cache-dir coverage | ||
| # Install coverage (if not in requirements.txt) | ||
| RUN pip install --no-cache-dir coverage | ||
|
|
||
| # Run Django tests with coverage | ||
| CMD ["sh", "-c", "coverage run manage.py test"] | ||
| # Copy application code and tests into the container | ||
| COPY ../backend /app/backend | ||
| COPY . /app/tests | ||
|
|
||
| # Run tests with coverage | ||
| CMD ["bash", "-c", "pytest --cov=backend --cov-report=xml"] |