-
-
Notifications
You must be signed in to change notification settings - Fork 44
Expand file tree
/
Copy pathDockerfile.test.py312
More file actions
34 lines (25 loc) · 873 Bytes
/
Dockerfile.test.py312
File metadata and controls
34 lines (25 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# docker/Dockerfile.test.py312
# For running tests in Python 3.12 after upgrade
FROM python:3.14-slim
ENV PIP_DISABLE_PIP_VERSION_CHECK=on \
PYTHONUNBUFFERED=1
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy dependency files
COPY pyproject.toml poetry.lock README.md ./
COPY pybot ./pybot
# Install poetry and dependencies in venv
RUN pip install --upgrade pip poetry && \
python -m venv /opt/venv && \
/opt/venv/bin/pip install --upgrade pip && \
/opt/venv/bin/pip install poetry && \
/opt/venv/bin/poetry install --no-interaction
# Set PATH to use venv
ENV PATH="/opt/venv/bin:$PATH"
# Copy test files
COPY tests ./tests
# Default command: run tests with coverage
CMD ["poetry", "run", "pytest", "-v", "--tb=short"]