Skip to content

Commit bca5f02

Browse files
committed
use uv dev dependencies, fix test workflow
1 parent 2ba7b72 commit bca5f02

File tree

7 files changed

+723
-42
lines changed

7 files changed

+723
-42
lines changed

.github/workflows/quality.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
name: Code quality
22
on:
33
push:
4-
env:
5-
UV_SYSTEM_PYTHON: 1
6-
74
jobs:
8-
95
run:
106
runs-on: ubuntu-latest
11-
127
steps:
138
- name: Acquire sources
149
uses: actions/[email protected]
@@ -21,13 +16,14 @@ jobs:
2116
- name: Setup Python
2217
uses: actions/[email protected]
2318
with:
24-
python-version: "3.12"
19+
python-version: "3.13"
2520
architecture: x64
2621

2722
- name: Install dev dependencies
28-
run: uv pip install -r dev-requirements.txt
23+
run: uv sync --python-preference only-system
24+
25+
- name: ruff format
26+
run: uv run ruff format --diff .
2927

30-
- name: Run ruff
31-
run: |
32-
ruff format --diff .
33-
ruff check --diff .
28+
- name: ruff check
29+
run: uv run ruff check --diff .

.github/workflows/tests.yml

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,7 @@
11
name: Tests
22
on:
33
push:
4-
env:
5-
UV_SYSTEM_PYTHON: 1
6-
SOFTHSM2_CONF: /tmp/softhsm2.conf
7-
84
jobs:
9-
105
run:
116
runs-on: ubuntu-latest
127
strategy:
@@ -17,20 +12,12 @@ jobs:
1712
- "3.11"
1813
- "3.12"
1914
- "3.12"
15+
- "3.13"
2016

2117
steps:
2218
- name: Install APT dependencies
2319
run: sudo apt-get install -y softhsm2
2420

25-
- name: env
26-
run: env
27-
28-
- name: id
29-
run: id
30-
31-
- name: Create SoftHSM token
32-
run: softhsm2-util --init-token --free --label TEST --pin 1234 --so-pin 5678
33-
3421
- name: Acquire sources
3522
uses: actions/[email protected]
3623

@@ -46,10 +33,10 @@ jobs:
4633
architecture: x64
4734

4835
- name: Install the project
49-
run: uv sync --all-extras --dev
36+
run: uv sync --all-extras --python-preference only-system --python ${{ matrix.python-version }}
5037

51-
- name: Install dev dependencies
52-
run: uv pip install -r dev-requirements.txt
38+
- name: ls
39+
run: ls /usr/lib/softhsm/libsofthsm2.so
5340

5441
- name: Run tests
55-
run: uv run pytest -v
42+
run: uv run --python ${{ matrix.python-version }} pytest -v tests/test_slots_and_tokens.py::test_get_mechanisms

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.13
1+
3.13

dev-requirements.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ classifiers = [
2222
"Programming Language :: Python :: 3.10",
2323
"Programming Language :: Python :: 3.11",
2424
"Programming Language :: Python :: 3.12",
25+
"Programming Language :: Python :: 3.13",
2526
"Topic :: Security :: Cryptography",
2627
]
2728
dependencies = [
@@ -63,3 +64,14 @@ combine-as-imports = true
6364

6465
[tool.setuptools.packages.find]
6566
include = ["pkcs11*"]
67+
68+
[dependency-groups]
69+
dev = [
70+
"cryptography>=44.0.0",
71+
"oscrypto>=1.3.0",
72+
"pytest>=8.3.4",
73+
"ruff>=0.8.3",
74+
"setuptools-scm>=8.1.0",
75+
"sphinx>=7.4.7",
76+
"sphinx-rtd-theme>=3.0.2",
77+
]

requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

uv.lock

Lines changed: 698 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)