mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-08 11:17:27 +00:00
we are going to use docker instead
This commit is contained in:
parent
8294a80fdf
commit
81d84368cf
1 changed files with 23 additions and 0 deletions
23
Dockerfile.test
Normal file
23
Dockerfile.test
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
FROM python:3.11-slim
|
||||
|
||||
# Install PostgreSQL binaries — required by pytest-postgresql to spawn ephemeral test databases
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends postgresql \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copy requirements first so Docker can cache the install layer
|
||||
COPY backend/engine/requirements.txt backend/engine/requirements.txt
|
||||
COPY backend/app/requirements/requirements.txt backend/app/requirements/requirements.txt
|
||||
COPY test.requirements.txt test.requirements.txt
|
||||
|
||||
RUN pip install --no-cache-dir \
|
||||
-r backend/engine/requirements.txt \
|
||||
-r backend/app/requirements/requirements.txt \
|
||||
-r test.requirements.txt
|
||||
|
||||
# Copy source
|
||||
COPY . .
|
||||
|
||||
CMD ["pytest"]
|
||||
Loading…
Add table
Reference in a new issue