Skip to content

Commit 2986aae

Browse files
committed
use uv dev dependencies, fix test workflow
1 parent 7c5c3f1 commit 2986aae

File tree

9 files changed

+176
-181
lines changed

9 files changed

+176
-181
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/__pycache__
2+
**/*.egg-info
3+
/pkcs11/*.c
4+
/pkcs11/*.so
5+
/build/
6+
/dist/

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
push:
44
jobs:
55
run:
6-
runs-on: ubuntu-latest
6+
runs-on: ubuntu-22.04
77
strategy:
88
matrix:
99
python-version:
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Install APT dependencies
19-
run: sudo apt-get install -y softhsm2
19+
run: sudo apt-get install -y gcc python3 python3-dev softhsm2 openssl
2020

2121
- name: Acquire sources
2222
uses: actions/[email protected]
@@ -38,5 +38,8 @@ jobs:
3838
- name: ls
3939
run: ls /usr/lib/softhsm/libsofthsm2.so
4040

41+
- name: Update setuptools
42+
run: uv pip install setuptools
43+
4144
- name: Run tests
4245
run: uv run --python ${{ matrix.python-version }} pytest -v tests/test_slots_and_tokens.py::test_get_mechanisms

Dockerfile.debian

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
ARG IMAGE=debian:stable
2+
FROM $IMAGE
3+
4+
RUN apt-get update && \
5+
DEBIAN_FRONTEND="noninteractive" apt-get install -y gcc python3 python3-dev softhsm2 openssl && \
6+
rm -rf /var/lib/apt/lists/*
7+
8+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
9+
10+
WORKDIR /test
11+
12+
ADD uv.lock pyproject.toml .
13+
ADD pkcs11/ pkcs11/
14+
ADD extern/ extern/
15+
16+
ENV UV_LINK_MODE=copy
17+
RUN --mount=type=cache,target=/root/.cache/uv \
18+
uv sync --all-extras
19+
20+
ADD tests/ tests/
21+
CMD ["uv", "run", "pytest", "-v"]

0 commit comments

Comments
 (0)