Skip to content

Commit

Permalink
use uv dev dependencies, fix test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasertl committed Dec 14, 2024
1 parent 2ba7b72 commit e4a38d6
Show file tree
Hide file tree
Showing 7 changed files with 724 additions and 34 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Code quality
on:
push:
env:
UV_SYSTEM_PYTHON: 1
UV_SYSTEM_PYTHON: true

jobs:

Expand All @@ -21,13 +21,14 @@ jobs:
- name: Setup Python
uses: actions/[email protected]
with:
python-version: "3.12"
python-version: "3.13"
architecture: x64

- name: Install dev dependencies
run: uv pip install -r dev-requirements.txt
run: uv sync --python-preference only-system

- name: Run ruff
run: |
ruff format --diff .
ruff check --diff .
- name: ruff format
run: uv run ruff format --diff .

- name: ruff check
run: uv run ruff check --diff .
19 changes: 5 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Tests
on:
push:
env:
UV_SYSTEM_PYTHON: 1
SOFTHSM2_CONF: /tmp/softhsm2.conf
UV_SYSTEM_PYTHON: true

jobs:

Expand All @@ -17,20 +16,12 @@ jobs:
- "3.11"
- "3.12"
- "3.12"
- "3.13"

steps:
- name: Install APT dependencies
run: sudo apt-get install -y softhsm2

- name: env
run: env

- name: id
run: id

- name: Create SoftHSM token
run: softhsm2-util --init-token --free --label TEST --pin 1234 --so-pin 5678

- name: Acquire sources
uses: actions/[email protected]

Expand All @@ -46,10 +37,10 @@ jobs:
architecture: x64

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

- name: Install dev dependencies
run: uv pip install -r dev-requirements.txt
- name: ls
run: /usr/lib/softhsm/libsofthsm2.so

- name: Run tests
run: uv run pytest -v
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.13
3.13
11 changes: 0 additions & 11 deletions dev-requirements.txt

This file was deleted.

12 changes: 12 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Security :: Cryptography",
]
dependencies = [
Expand Down Expand Up @@ -63,3 +64,14 @@ combine-as-imports = true

[tool.setuptools.packages.find]
include = ["pkcs11*"]

[dependency-groups]
dev = [
"cryptography>=44.0.0",
"oscrypto>=1.3.0",
"pytest>=8.3.4",
"ruff>=0.8.3",
"setuptools-scm>=8.1.0",
"sphinx>=7.4.7",
"sphinx-rtd-theme>=3.0.2",
]
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

698 changes: 698 additions & 0 deletions uv.lock

Large diffs are not rendered by default.

0 comments on commit e4a38d6

Please sign in to comment.