-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.test
More file actions
35 lines (27 loc) · 1.09 KB
/
Dockerfile.test
File metadata and controls
35 lines (27 loc) · 1.09 KB
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
35
# Test runner: installs ALL extras including PQ crypto (liboqs)
FROM python:3.12-slim
# System deps for liboqs build + pgvector client
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential cmake git libssl-dev \
&& rm -rf /var/lib/apt/lists/*
# Install liboqs from source (required for liboqs-python)
RUN git clone --depth 1 --branch 0.14.0 https://github.com/open-quantum-safe/liboqs.git /tmp/liboqs \
&& cd /tmp/liboqs && mkdir build && cd build \
&& cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON .. \
&& make -j$(nproc) && make install \
&& ldconfig \
&& rm -rf /tmp/liboqs
WORKDIR /app
# Copy package files
COPY pyproject.toml README.md LICENSE ./
COPY src/ src/
# Install all extras
RUN pip install --no-cache-dir -e ".[all,dev]"
# Install liboqs-python (needs the native lib we just built)
RUN pip install --no-cache-dir liboqs-python
# Copy tests
COPY tests/ tests/
# Default: run full test suite with coverage
CMD ["pytest", "tests/", "-v", "--tb=short", \
"--cov=qp_vault", "--cov-report=term-missing", \
"-x"]