mirror of
https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git
synced 2025-08-14 00:25:46 +02:00
Тесты для бекенда
This commit is contained in:
14
backend/Dockerfile.test
Normal file
14
backend/Dockerfile.test
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM python:3.9
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Устанавливаем зависимости
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
RUN pip install pytest pytest-asyncio pytest-cov
|
||||
|
||||
# Копируем код приложения
|
||||
COPY . .
|
||||
|
||||
# Ждем доступности базы данных и запускаем тесты
|
||||
CMD ["sh", "-c", "while ! nc -z test-db 5432; do sleep 1; done; pytest tests/ -v --cov=app"]
|
||||
Reference in New Issue
Block a user