Merge branch 'weblate-gnu-mailman-mailman' into 'master'
[mailman.git] / tox.ini
blobb4456d6daca3d38d365eff81556a49efa4fd67a8
1 [tox]
2 envlist = {py39,py310,py311,py312}-{nocov,cov,diffcov}{,-mysql,-pg},qa
3 #recreate = True
4 skip_missing_interpreters = True
6 [testenv]
7 commands =
8 nocov: python -m nose2 -v {posargs}
9 cov,diffcov: python -m coverage run {[coverage]rc} -m nose2 {posargs}
10 cov,diffcov: python -m coverage combine {[coverage]rc}
11 cov: python -m coverage html {[coverage]rc}
12 cov: python -m coverage report -m {[coverage]rc} --fail-under=93
13 diffcov: python -m coverage xml {[coverage]rc}
14 diffcov: diff-cover coverage.xml --html-report diffcov.html --compare-branch origin/master
15 diffcov: diff-cover coverage.xml --fail-under=100 --compare-branch origin/master
16 #sitepackages = True
17 usedevelop = True
18 deps =
19 flufl.testing>=0.8
20 nose2
21 cov,diffcov: coverage
22 pg: psycopg2-binary
23 mysql: pymysql
24 diffcov: diff_cover>=6.0
25 passenv =
26 MAILMAN_*
27 PYTHON*
28 LANG*
29 LC_*
30 GIT_*
31 HOME
32 setenv =
33 cov: COVERAGE_PROCESS_START={[coverage]rcfile}
34 cov: COVERAGE_OPTIONS="-p"
35 cov: COVERAGE_FILE={toxinidir}/.coverage
36 allowlist_externals =
37 git
39 [testenv:qa]
40 basepython = python3
41 commands =
42 python -m flake8 src
43 isort --check-only .
44 deps =
45 flake8>3.0
46 isort
48 [testenv:docs]
49 basepython = python3
50 commands =
51 sphinx-build -t html . build/sphinx/html
52 deps = -rrequirements-docs.txt
54 [coverage]
55 rcfile = {toxinidir}/coverage.ini
56 rc = --rcfile={[coverage]rcfile}
58 [flake8]
59 exclude = src/mailman/compat/*.py
60 hang-closing = False
61 jobs = 1
62 max-line-length = 79
64 [isort]
65 include_trailing_comma = True
66 known_first_party = mailman
67 length_sort_straight = True
68 lines_after_imports = 2
69 lines_between_types = 1
70 multi_line_output = 3
71 order_by_type = False
72 no_sections = True
73 combine_as_imports = True
75 [testenv:sort-imports]
76 basepython = python3
77 commands = isort .
78 deps = isort
80 # setup.cfg or tox.ini
81 [check-manifest]
82 ignore =
83 dev/*
84 port_me/*
85 *.yml
86 ignore-bad-ideas =
87 src/mailman/testing/*