Files
django-anymail/tox.ini
Tim Schilling a4f50c4340 Confirm support for Django 4.1
Replaces deprecated `django.utils.timezone.utc` with
`datetime.timezone.utc` (available since Python 3.2).
2022-08-24 13:24:27 -07:00

118 lines
3.7 KiB
INI

[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
django41-py310-all
django20-py35-all
docs
# ... then test all the other supported combinations:
# Django 4.1: Python 3.8, 3.9, 3.10
django41-py{38,39,py38}-all
# Django 4.0: Python 3.8, 3.9, 3.10
django40-py{38,39,310,py38}-all
# Django 3.2: Python 3.6, 3.7, 3.8, 3.9
django32-py{36,37,38,39,py38}-all
# Django 3.1: Python 3.6, 3.7, 3.8, 3.9 (added in 3.1.3)
django31-py{36,37,38,39,py38}-all
# Django 3.0: Python 3.6, 3.7, 3.8, 3.9 (added in 3.0.11)
django30-py{36,37,38,39,py38}-all
# Django 2.2: Python 3.5, 3.6, 3.7, 3.8 (added in 2.2.8), 3.9 (added in 2.2.17)
django22-py{35,36,37,38,39,py38}-all
# Django 2.1: Python 3.5, 3.6, or 3.7
django21-py{35,36,37,py37}-all
# Django 2.0: Python 3.5+
django20-py{36,py36}-all
# ... then prereleases (if available) and current development:
djangoDev-py{38,39,310,py38}-all
# ... then partial installation (limit extras):
django40-py310-{none,amazon_ses,postal}
# ... then older versions of some dependencies:
django22-py37-all-old_urllib3
[testenv]
deps =
django20: django~=2.0.0
django21: django~=2.1.0
django22: django~=2.2.0
django30: django~=3.0.0
django31: django~=3.1.0
django32: django~=3.2.0
django40: django~=4.0.0
django41: django~=4.1.0
djangoDev: https://github.com/django/django/tarball/main
old_urllib3: urllib3<1.25
extras =
# install [test] extras, unconditionally
test
# install [esp_name] extras only when testing "all" or esp_name factor
all,amazon_ses: amazon_ses
all,postal: postal
setenv =
# tell runtests.py to limit some test tags based on extras factor
none: ANYMAIL_SKIP_TESTS=amazon_ses,postal
amazon_ses: ANYMAIL_ONLY_TEST=amazon_ses
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
sendgrid: ANYMAIL_ONLY_TEST=sendgrid
sendinblue: ANYMAIL_ONLY_TEST=sendinblue
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}
args_are_paths = false
commands_pre =
python -VV
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.8
skip_install = true
passenv =
CONTINUOUS_INTEGRATION
# (but not any of the live test API keys)
deps =
flake8
commands_pre =
python -VV
flake8 --version
commands =
flake8
[testenv:docs]
basepython = python3.8
skip_install = true
passenv =
CONTINUOUS_INTEGRATION
# (but not any of the live test API keys)
setenv =
DOCS_BUILD_DIR={envdir}/_html
whitelist_externals = /bin/bash
deps =
-rdocs/requirements.txt
commands_pre =
python -VV
sphinx-build --version
commands =
# Verify README.rst as used in setup.py long_description:
python setup.py check --restructuredtext --strict
# Build and verify docs:
sphinx-build -W -b dirhtml docs {env:DOCS_BUILD_DIR}
# Build README.rst into html:
/bin/bash -c 'python setup.py --long-description \
| rst2html5.py --config=docs/_readme/docutils.cfg \
> {env:DOCS_BUILD_DIR}/readme.html'