-
Notifications
You must be signed in to change notification settings - Fork 53
/
pyproject.toml
110 lines (96 loc) · 2.92 KB
/
pyproject.toml
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
101
102
103
104
105
106
107
108
109
110
[build-system]
requires = [ "setuptools >= 35.0.2", "wheel >= 0.29.0"]
build-backend = "setuptools.build_meta"
[tool.coverage.run]
branch = true
source_pkgs = ["ldaptor"]
parallel = true
[tool.coverage.paths]
source = [
"ldaptor",
"*/site-packages/ldaptor",
'*\site-packages\ldaptor',
]
[tool.tox]
legacy_tox_ini = """
; tox configuration file for running tests on local dev env and CI.
;
; The local dev environment will be executed against latest released Twisted.
; The coverage is reported only and local dev and not on CI as there
; we have separate reported (ex codecov.io)
[tox]
minversion=3.20.0
isolated_build=true
requires=
virtualenv >= 20.1.0
tox-wheel >= 0.6.0
tox-gh-actions >= 2.1.0
;
; Tags explanation:
; * test - run trial tests
; * dev - run things in local dev mode
envlist =
py{36,37,38,39,py3}-test-{twlatest,twtrunk,dev}
py39-linters,
documentation,
[testenv]
wheel = True
wheel_build_env = build
parallel_show_output = True
deps =
coverage[toml] >= 5.3
pyparsing
passlib
twlatest: Twisted[tls]
twtrunk: Twisted[tls] @ https://github.com/twisted/twisted/archive/trunk.tar.gz
; Dependecies for local dev environment.
dev: Twisted[tls]
dev: diff_cover
; Linters are installed both on local dev and the dedicated env.
{dev,linters}: pre-commit
; All environment variables are passed.
passenv = *
; Each command should have an associated tag as we use the same config for
; all the environments.
; This is done in order to reuse
commands =
{envpython} --version
test: trial --version
test: coverage run --rcfile={toxinidir}/pyproject.toml -m twisted.trial --temp-directory={envtmpdir}/_trial_temp {posargs:ldaptor}
; Only run on local dev env.
dev: coverage report --show-missing
dev: coverage xml -o {toxinidir}/build/coverage.xml
dev: coverage html -d build/coverage-html
dev: diff-cover --fail-under 100 --html-report {toxinidir}/build/coverage-diff.html {toxinidir}/build/coverage.xml
dev: pre-commit run --all-files --show-diff-on-failure
linters: pre-commit {posargs:run --all-files --show-diff-on-failure}
[testenv:build]
# empty environment to build universal wheel once per tox invocation
# https://github.com/ionelmc/tox-wheel#build-configuration
[testenv:documentation]
deps = sphinx
basepython=python3.9
changedir = {envtmpdir}
whitelist_externals = cp
commands =
sphinx-build -b html -Ean -j 2 -w sphinx-errors \
{toxinidir}/docs/source ./docs/
cp -r . {toxinidir}/build
[testenv:release]
deps = pep517
whitelist_externals =
cp
rm
commands =
rm -rf {toxinidir}/dist
cp -r {distdir} {toxinidir}/dist # copy the wheel built by tox-wheel
{envpython} -m pep517.build --source --out-dir={toxinidir}/dist {toxinidir}
[testenv:publishcov]
passenv = GITHUB_*
deps =
codecov
coverage[toml]>=5.3
commands =
codecov --required
depends = py{,35,36,37,38,39,py3}-test-{twlatest,twtrunk,dev}
"""