Skip to content

Commit 967f9aa

Browse files
authored
Merge pull request #39 from smkent/tests
Add more snapshot unit tests
2 parents bf1a659 + 4ca764d commit 967f9aa

4 files changed

Lines changed: 747 additions & 0 deletions

File tree

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
# serializer version: 1
2+
# name: test_workflows_container[3.12-3.10]
3+
'''
4+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
5+
6+
WORKDIR /app
7+
8+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
9+
COPY pyproject.toml ./
10+
RUN --mount=type=cache,target=/root/.cache/uv \
11+
uv sync --no-dev --no-install-project
12+
13+
# Copy source and install project
14+
COPY pkfire/ ./pkfire/
15+
RUN --mount=type=cache,target=/root/.cache/uv \
16+
uv sync --no-dev
17+
18+
RUN useradd --no-create-home --shell /bin/false app
19+
USER app
20+
21+
CMD ["uv", "run", "python", "-m", "pkfire"]
22+
23+
'''
24+
# ---
25+
# name: test_workflows_container[3.12-3.12]
26+
'''
27+
FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
28+
29+
WORKDIR /app
30+
31+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
32+
COPY pyproject.toml ./
33+
RUN --mount=type=cache,target=/root/.cache/uv \
34+
uv sync --no-dev --no-install-project
35+
36+
# Copy source and install project
37+
COPY pkfire/ ./pkfire/
38+
RUN --mount=type=cache,target=/root/.cache/uv \
39+
uv sync --no-dev
40+
41+
RUN useradd --no-create-home --shell /bin/false app
42+
USER app
43+
44+
CMD ["uv", "run", "python", "-m", "pkfire"]
45+
46+
'''
47+
# ---
48+
# name: test_workflows_container[3.14-3.10]
49+
'''
50+
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
51+
52+
WORKDIR /app
53+
54+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
55+
COPY pyproject.toml ./
56+
RUN --mount=type=cache,target=/root/.cache/uv \
57+
uv sync --no-dev --no-install-project
58+
59+
# Copy source and install project
60+
COPY pkfire/ ./pkfire/
61+
RUN --mount=type=cache,target=/root/.cache/uv \
62+
uv sync --no-dev
63+
64+
RUN useradd --no-create-home --shell /bin/false app
65+
USER app
66+
67+
CMD ["uv", "run", "python", "-m", "pkfire"]
68+
69+
'''
70+
# ---
71+
# name: test_workflows_container[3.14-3.12]
72+
'''
73+
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
74+
75+
WORKDIR /app
76+
77+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
78+
COPY pyproject.toml ./
79+
RUN --mount=type=cache,target=/root/.cache/uv \
80+
uv sync --no-dev --no-install-project
81+
82+
# Copy source and install project
83+
COPY pkfire/ ./pkfire/
84+
RUN --mount=type=cache,target=/root/.cache/uv \
85+
uv sync --no-dev
86+
87+
RUN useradd --no-create-home --shell /bin/false app
88+
USER app
89+
90+
CMD ["uv", "run", "python", "-m", "pkfire"]
91+
92+
'''
93+
# ---
94+
# name: test_workflows_container[No maximum-3.10]
95+
'''
96+
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
97+
98+
WORKDIR /app
99+
100+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
101+
COPY pyproject.toml ./
102+
RUN --mount=type=cache,target=/root/.cache/uv \
103+
uv sync --no-dev --no-install-project
104+
105+
# Copy source and install project
106+
COPY pkfire/ ./pkfire/
107+
RUN --mount=type=cache,target=/root/.cache/uv \
108+
uv sync --no-dev
109+
110+
RUN useradd --no-create-home --shell /bin/false app
111+
USER app
112+
113+
CMD ["uv", "run", "python", "-m", "pkfire"]
114+
115+
'''
116+
# ---
117+
# name: test_workflows_container[No maximum-3.12]
118+
'''
119+
FROM ghcr.io/astral-sh/uv:python3.14-bookworm-slim
120+
121+
WORKDIR /app
122+
123+
# Install dependencies first (cached layer, only invalidated by pyproject.toml changes)
124+
COPY pyproject.toml ./
125+
RUN --mount=type=cache,target=/root/.cache/uv \
126+
uv sync --no-dev --no-install-project
127+
128+
# Copy source and install project
129+
COPY pkfire/ ./pkfire/
130+
RUN --mount=type=cache,target=/root/.cache/uv \
131+
uv sync --no-dev
132+
133+
RUN useradd --no-create-home --shell /bin/false app
134+
USER app
135+
136+
CMD ["uv", "run", "python", "-m", "pkfire"]
137+
138+
'''
139+
# ---

0 commit comments

Comments
 (0)