Skip to content

Commit 8626aa7

Browse files
committed
run test in github actions (and with pytest)
1 parent f77616e commit 8626aa7

File tree

3 files changed

+56
-7
lines changed

3 files changed

+56
-7
lines changed

.github/workflows/quality.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
1413
- name: Acquire sources
1514
uses: actions/[email protected]
1615

@@ -25,12 +24,6 @@ jobs:
2524
python-version: "3.12"
2625
architecture: x64
2726

28-
- name: Apply caching of dependencies
29-
uses: actions/[email protected]
30-
with:
31-
path: ~/.cache/pip
32-
key: pip-${{ hashFiles('**/requirements-*.txt') }}
33-
3427
- name: Install dev dependencies
3528
run: uv pip install -r dev-requirements.txt
3629

.github/workflows/tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Tests
2+
on:
3+
push:
4+
env:
5+
UV_SYSTEM_PYTHON: 1
6+
SOFTHSM2_CONF: ${{ env.HOME }}/softhsm2.conf
7+
8+
jobs:
9+
10+
run:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version:
15+
- "3.9"
16+
- "3.10"
17+
- "3.11"
18+
- "3.12"
19+
- "3.12"
20+
21+
steps:
22+
- name: Install APT dependencies
23+
run: sudo apt-get install -y softhsm2
24+
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+
34+
- name: Acquire sources
35+
uses: actions/[email protected]
36+
37+
- name: Install uv
38+
uses: astral-sh/setup-uv@v4
39+
with:
40+
enable-cache: true
41+
42+
- name: Setup Python
43+
uses: actions/[email protected]
44+
with:
45+
python-version: ${{ matrix.python-version }}
46+
architecture: x64
47+
48+
- name: Install the project
49+
run: uv sync --all-extras --dev
50+
51+
- name: Install dev dependencies
52+
run: uv pip install -r dev-requirements.txt
53+
54+
- name: Run tests
55+
run: uv run pytest -v

dev-requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ setuptools_scm
55
oscrypto
66
cryptography
77
parameterized
8+
pytest==8.3.4
89
ruff==0.8.2
910
sphinx
1011
sphinx-rtd-theme

0 commit comments

Comments
 (0)