-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 841 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (20 loc) · 841 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
FROM python:3.12-slim
# Install Node.js (needed for project context scanning in hooks)
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
curl \
&& curl -fsSL https://deb.nodesource.com/setup_24.x | bash - \
&& apt-get install -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
# Copy project files (context provided by CI)
COPY . .
# Install Python test dependencies
RUN pip install --no-cache-dir -r tests/e2e/plugin-hooks/requirements.txt
# Configure git for tests (conftest.py uses git init)
RUN git config --global user.name "CI Bot" \
&& git config --global user.email "ci@test.local" \
&& git config --global init.defaultBranch main
# Run E2E tests
CMD ["python3", "-m", "pytest", "tests/e2e/plugin-hooks/", "-v", "--timeout=30", "--tb=short"]