-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathtox.ini
More file actions
50 lines (45 loc) · 1.25 KB
/
tox.ini
File metadata and controls
50 lines (45 loc) · 1.25 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
[tox]
envlist = py{39,310,311,312,313},lint,mypy,mypy-samples-{image,json}
skipsdist = True
[testenv]
usedevelop = True
deps =
-r{toxinidir}/requirements/test.txt
-r{toxinidir}/requirements/publish.txt
setenv =
PYTESTARGS = -v -s --tb=long --cov=cloudevents --cov-report term-missing --cov-fail-under=95
commands = pytest {env:PYTESTARGS} {posargs}
[testenv:reformat]
basepython = python3.12
deps =
black
isort
commands =
black .
isort cloudevents samples
[testenv:lint]
basepython = python3.12
deps =
black
isort
flake8
commands =
black --check .
isort -c cloudevents samples
flake8 cloudevents samples --ignore W503,E731 --extend-ignore E203 --max-line-length 88
[testenv:mypy]
basepython = python3.12
deps =
-r{toxinidir}/requirements/mypy.txt
# mypy needs test dependencies to check test modules
-r{toxinidir}/requirements/test.txt
commands = mypy cloudevents
[testenv:mypy-samples-{image,json}]
basepython = python3.12
setenv =
mypy-samples-image: SAMPLE_DIR={toxinidir}/samples/http-image-cloudevents
mypy-samples-json: SAMPLE_DIR={toxinidir}/samples/http-json-cloudevents
deps =
-r{toxinidir}/requirements/mypy.txt
-r{env:SAMPLE_DIR}/requirements.txt
commands = mypy {env:SAMPLE_DIR}