1
0
mirror of https://gitlab.com/MoonTestUse1/AdministrationItDepartmens.git synced 2025-08-14 00:25:46 +02:00
Files
AdministrationItDepartmens/backend/Dockerfile.test
2025-01-19 22:17:56 +06:00

14 lines
449 B
Docker
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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
# Копируем код приложения22
COPY . .
# Ждем доступности базы данных и запускаем тесты
CMD ["sh", "-c", "while ! nc -z test-db 5432; do sleep 1; done; pytest tests/ -v --cov=app"]