-
Notifications
You must be signed in to change notification settings - Fork 79
87 lines (87 loc) · 2.45 KB
/
tests.yml
File metadata and controls
87 lines (87 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: Tests
on:
push:
branches: ["**"]
pull_request: {}
workflow_dispatch: {}
env:
UV_PYTHON_PREFERENCE: only-system
UV_NO_SYNC: "1"
PKCS11_TOKEN_LABEL: "TEST"
PKCS11_TOKEN_PIN: "1234"
PKCS11_TOKEN_SO_PIN: "5678"
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
# Our test suite is pretty fast, so fail-fast: false allows for better troubleshooting.
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-14
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
pkcs11-platform:
- softhsm
- opencryptoki
exclude:
# only run opencryptoki tests on ubuntu
# (macos and windows don't seem to be supported)
- pkcs11-platform: opencryptoki
os: windows-latest
- pkcs11-platform: opencryptoki
os: macos-14
steps:
- name: Acquire sources
uses: actions/checkout@v6
- uses: ./.github/actions/test-setup
id: setup
with:
os: ${{ matrix.os }}
token-label: ${{ env.PKCS11_TOKEN_LABEL }}
token-so-pin: ${{ env.PKCS11_TOKEN_SO_PIN }}
token-user-pin: ${{ env.PKCS11_TOKEN_PIN }}
python-version: ${{ matrix.python-version }}
pkcs11-platform: ${{ matrix.pkcs11-platform }}
dependency-group: testing
- name: Run tests
run: uv run pytest -v
env:
PKCS11_MODULE: ${{ steps.setup.outputs.module }}
multilib-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
- name: Acquire sources
uses: actions/checkout@v6
- uses: ./.github/actions/test-setup
id: setup
with:
os: ubuntu-latest
pkcs11-platform: multi
token-label: ${{ env.PKCS11_TOKEN_LABEL }}
token-so-pin: ${{ env.PKCS11_TOKEN_SO_PIN }}
token-user-pin: ${{ env.PKCS11_TOKEN_PIN }}
python-version: ${{ matrix.python-version }}
dependency-group: testing
- name: Run tests
run: uv run pytest -v tests/test_multilib.py
env:
PKCS11_MODULE: ${{ steps.setup.outputs.module }}
PKCS11_MODULE2: ${{ steps.setup.outputs.module2 }}