Add support for Python 3.11
[mailman-postorious.git] / tox.ini
blob26194443ecaa69f9385c8a0818f3c5b9cf3defa3
1 [tox]
2 envlist = py{37,38,39,310,311}-django{32,40,41,-latest},qa
4 [testenv]
5 usedevelop = True
6 changedir = {toxinidir}
7 deps =
8 beautifulsoup4
9 django-debug-toolbar
10 django-requests-debug-toolbar
11 git: git+https://gitlab.com/mailman/mailmanclient@master
12 git: git+https://gitlab.com/mailman/mailman@master
13 git: git+https://gitlab.com/mailman/django-mailman3.git
14 mailman
15 mailmanclient
16 django-mailman3
17 pytest
18 pytest-django
19 dev: -e../mailmanclient
20 dev: -e../django-mailman3
21 dev: https://github.com/django/django/archive/main.tar.gz
22 django32: django>=3.2,<3.3
23 django40: django>=4.0,<4.1
24 django41: django>=4.1,<4.2
25 django-latest: https://github.com/django/django/archive/main.tar.gz
26 commands =
27 pytest {posargs:src/}
28 setenv =
29 LC_ALL = C.UTF-8
30 LANG = C.UTF-8
32 [testenv:cov]
33 basepython = python3
34 deps =
35 {[testenv]deps}
36 Django>=3.2,<4.2
37 coverage
38 commands =
39 coverage run -m pytest {posargs:src/}
40 coverage html
41 coverage report -m
42 setenv =
43 LC_ALL = C.UTF-8
44 LANG = C.UTF-8
46 [testenv:qa]
47 basepython = python3
48 changedir = {toxinidir}
49 deps =
50 flake8 < 5
51 isort
52 blue
53 commands =
54 flake8 src/ {posargs}
55 isort --check-only src
56 blue --check .
58 [testenv:docs]
59 deps =
60 sphinx
61 sphinx-rtd-theme
62 allowlist_externals =
63 mkdir
64 commands=
65 mkdir -p {toxinidir}/src/postorius/doc/_static
66 sphinx-build -t html src/postorius/doc build/
68 [testenv:format]
69 deps =
70 isort
71 blue
72 commands =
73 isort .
74 blue .
76 [flake8]
77 basepython = python3
78 ignore = E123, E133, W504, W503
79 show-source = True
80 exclude = .git,.tox,dist,*egg,src/postorius/doc,example_project
83 [isort]
84 line_length=79
85 # multi_line_output=4
86 balanced_wrapping=True
87 known_django=django
88 sections=FUTURE,STDLIB,DJANGO,THIRDPARTY,FIRSTPARTY,LOCALFOLDER
89 no_lines_before=LOCALFOLDER
90 lines_after_imports=2
91 use_parentheses=True
92 default_section=THIRDPARTY
93 known_first_party=postorius
94 profile=black
95 skip_gitignore=True
96 include_trailing_comma = true
97 indent = ' '
99 [blue]
100 extend-exclude =
101 src/postorius/migrations/*