forked from mpdavis/python-jose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
79 lines (69 loc) · 2.12 KB
/
tox.ini
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
[tox]
min_version = 4.4
envlist =
py{37,38,39,310,311,py3}-{base,cryptography-only,pycryptodome-norsa,compatibility},
lint
skip_missing_interpreters = True
[gh-actions]
python =
3.7: py37-{base,cryptography-only,pycryptodome-norsa,compatibility}
3.8: py38-{base,cryptography-only,pycryptodome-norsa,compatibility}
3.9: py39-{base,cryptography-only,pycryptodome-norsa,compatibility}
3.10: py310-{base,cryptography-only,pycryptodome-norsa,compatibility}
3.11: py311-{base,cryptography-only,pycryptodome-norsa,compatibility}
pypy-3.9: pypy3-{base,cryptography-only,pycryptodome-norsa,compatibility}
[testenv:basecommand]
commands =
pip --version
pytest --cov-append --cov-report term-missing --cov jose {posargs}
[testenv:pypy3-compatibility]
# This testenv locks up during coverage so just run tests
commands =
pip --version
pytest
[testenv:compatibility]
extras =
cryptography
pycryptodome
[testenv]
deps =
pytest
pytest-cov
commands_pre =
# Remove the python-rsa and python-ecdsa backends
only: pip uninstall -y ecdsa rsa
# Remove just the python-rsa backend
norsa: pip uninstall -y rsa
commands =
# Test the python-rsa backend
base: {[testenv:basecommand]commands} -m "not (cryptography or pycryptodome or backend_compatibility)"
# Test the pyca/cryptography backend
cryptography: {[testenv:basecommand]commands} -m "not (pycryptodome or backend_compatibility)"
# Test the pycryptodome backend
pycryptodome: {[testenv:basecommand]commands} -m "not (cryptography or backend_compatibility)"
# Test cross-backend compatibility and coexistence
compatibility: {[testenv:basecommand]commands}
extras =
cryptography: cryptography
pycryptodome: pycryptodome
compatibility: {[testenv:compatibility]extras}
[testenv:lint]
basepython = python3.10
skip_install= True
deps =
flake8
isort
black
commands =
flake8 jose setup.py
isort jose tests setup.py --check-only
black . --check
[testenv:lintfix]
basepython = python3.10
skip_install= True
deps =
isort
black
commands =
isort jose tests setup.py
black .