-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
100 lines (94 loc) · 1.75 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
#
# Setup:
#
# $ python3 -m venv .venv
# $ source .venv/bin/activate
# (.venv) $ pip install -U pip setuptools
# (.venv) $ pip install tox
#
# Usage:
#
# $ tox list # to list environments
# $ tox [-e <enviroment>] [-- <pytest-options>]
#
[tox]
minversion = 4.12.0
env_list = py{38,39,310,311,312}
[testenv]
description = Run the tests
package = wheel
wheel_build_env = .pkg
deps =
pytest==8.0.2
commands =
pytest -v tests {posargs}
#
# Usage: tox -e dev
#
# To activate the development environment:
#
# deactivate
# source .tox/dev/bin/activate
#
# Run the tests with pytest:
#
# pytest --co tests # list tests
# pytest -v [-k <pattern>] tests # run tests
#
[testenv:dev]
description = Development environment
basepython = python3.12
usedevelop = True
deps =
tox
pytest==8.0.2
commands =
#
# Usage: tox -e format
#
[testenv:format]
description = Format code with black
basepython = python3.12
deps =
black==24.2.0
commands =
python -m black --skip-string-normalization git_gerrit tests
#
# Usage: tox -e lint
#
[testenv:lint]
description = Run static checks
basepython = python3.12
deps =
flake8==7.0.0
pyflakes==3.2.0
commands =
pyflakes git_gerrit tests
flake8 --max-line-length=92 --ignore=E203,E701 git_gerrit tests
#
# Usage: tox -e build
#
[testenv:build]
basepython = python3.12
deps =
build==1.0.3
commands =
python -m build
#
# Usage: tox -e release
#
# Note: Set TWINE env vars or ~/.pypirc before running.
#
[testenv:release]
basepython = python3.12
passenv =
TWINE_USERNAME
TWINE_PASSWORD
TWINE_REPOSITORY_URL
deps =
build==1.0.3
twine==5.1.1
commands =
python -m build
twine check dist/*
twine upload --repository git-gerrit --skip-existing dist/*