-
Notifications
You must be signed in to change notification settings - Fork 133
/
tox.ini
125 lines (122 loc) · 4.09 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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
[tox]
envlist =
# Anymail supports the same Python versions as Django, plus PyPy.
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
# Factors: django-python-extras
# Test lint, docs, earliest/latest Django first, to catch most errors early...
lint
django51-py312-all
django40-py38-all
docs
# ... then test all the other supported combinations:
# Django 5.1: Python 3.10, 3.11, and 3.12
django51-py{310,311}-all
# Django 5.0: Python 3.10, 3.11, and 3.12
django50-py{310,311,312}-all
# Django 4.2: Python 3.8, 3.9, 3.10, 3.11
django42-py{38,39,310,311,py38,py39}-all
# Django 4.1: Python 3.8, 3.9, 3.10
django41-py{38,39,310,py38,py39}-all
# Django 4.0: Python 3.8, 3.9, 3.10
django40-py{39,310,py38,py39}-all
# ... then prereleases (if available) and current development:
# Django 5.2 pre-release: Python 3.10, 3.11, 3.12 and 3.13
# django52-py{310,311,312,313}-all
# Django 5.2 dev: Python 3.10, 3.11, 3.12 and 3.13
djangoDev-py{310,311,312,313}-all
# ... then partial installation (limit extras):
django51-py312-{none,amazon_ses,postal,resend}
# tox requires isolated builds to use pyproject.toml build config:
isolated_build = True
[testenv]
args_are_paths = false
# Download latest version of pip/setuptools available on each Python version:
download = true
deps =
-rtests/requirements.txt
django40: django~=4.0.0
django41: django~=4.1.0
django42: django~=4.2.0
django50: django~=5.0.0
django51: django~=5.1.0
django52: django~=5.2.0a0
djangoDev: https://github.com/django/django/tarball/main
extras =
# Install [esp-name] extras only when testing "all" or esp_name factor.
# (Only ESPs with extra dependencies need to be listed here.
# Careful: tox factors (on the left) use underscore; extra names use hyphen.)
all,amazon_ses: amazon-ses
all,postal: postal
all,resend: resend
setenv =
# tell runtests.py to limit some test tags based on extras factor
# (resend should work with or without its extras, so it isn't in `none`)
none: ANYMAIL_SKIP_TESTS=amazon_ses,postal
amazon_ses: ANYMAIL_ONLY_TEST=amazon_ses
brevo: ANYMAIL_ONLY_TEST=brevo
mailersend: ANYMAIL_ONLY_TEST=mailersend
mailgun: ANYMAIL_ONLY_TEST=mailgun
mailjet: ANYMAIL_ONLY_TEST=mailjet
mandrill: ANYMAIL_ONLY_TEST=mandrill
postal: ANYMAIL_ONLY_TEST=postal
postmark: ANYMAIL_ONLY_TEST=postmark
resend: ANYMAIL_ONLY_TEST=resend
sendgrid: ANYMAIL_ONLY_TEST=sendgrid
unisender_go: ANYMAIL_ONLY_TEST=unisender_go
sparkpost: ANYMAIL_ONLY_TEST=sparkpost
ignore_outcome =
# CI that wants to handle errors itself can set TOX_OVERRIDE_IGNORE_OUTCOME=false
djangoDev: {env:TOX_OVERRIDE_IGNORE_OUTCOME:true}
commands_pre =
python -VV
python -m pip --version
python -c 'import django; print("Django", django.__version__)'
commands =
python runtests.py {posargs}
passenv =
ANYMAIL_ONLY_TEST
ANYMAIL_SKIP_TESTS
ANYMAIL_RUN_LIVE_TESTS
CONTINUOUS_INTEGRATION
ANYMAIL_TEST_*
[testenv:lint]
basepython = python3.12
skip_install = true
passenv =
CONTINUOUS_INTEGRATION
# Make sure pre-commit can clone hook repos over ssh or http proxy.
# https://pre-commit.com/#usage-with-tox
SSH_AUTH_SOCK
http_proxy
https_proxy
no_proxy
# (but not any of the live test API keys)
deps =
pre-commit
commands_pre =
python -VV
pre-commit --version
commands =
pre-commit validate-config
pre-commit run --all-files
[testenv:docs]
basepython = python3.12
passenv =
CONTINUOUS_INTEGRATION
GOOGLE_ANALYTICS_ID
# (but not any of the live test API keys)
setenv =
DOCS_BUILD_DIR={envdir}/_html
deps =
-rdocs/requirements.txt
commands_pre =
python -VV
sphinx-build --version
commands =
# Build and verify docs:
sphinx-build -W -b dirhtml docs {env:DOCS_BUILD_DIR}
# Build and verify package metadata readme.
# Errors here are in README.rst:
python docs/_readme/render.py \
--package django-anymail \
--out {env:DOCS_BUILD_DIR}/readme.html