Red-DiscordBot/tox.ini
palmtree5 3254698c78
Update deps, allow Python 3.9, drop Fedora 32 (#5121)
* Update deps + allow Python 3.9

* Add in updates from Jack's branch

* Fix multiple target for cross-reference warnings

* Update a few more Python 3.8 occurrences

* Bump further

* Don't install tox in CodeQL environment

* Bump Python version in docs to 3.9.7

* more bumps

* Add missing pin

* Stop using the deprecated distro.linux_distribution()

* Suppress deprecation warning

* Fix OpenSUSE Leap instructions

* Drop Fedora 32

* Add Python 3.10-dev to CI

* meh

Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com>
2021-09-06 18:43:29 +02:00

73 lines
1.8 KiB
INI

# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist =
py38
py39
docs
style
skip_missing_interpreters = True
[testenv]
description = Run tests and basic automatic issue checking.
whitelist_externals =
pytest
pylint
extras = voice, test
setenv =
TOX_RED = 1
commands =
python -m compileall ./redbot/cogs
pytest
# pylint ./redbot
[testenv:postgres]
description = Run pytest with PostgreSQL backend
whitelist_externals =
pytest
extras = voice, test, postgres
setenv =
TOX_RED = 1
RED_STORAGE_TYPE=postgres
passenv =
# Use the following env vars for connection options, or other default options described here:
# https://magicstack.github.io/asyncpg/current/index.html#asyncpg.connection.connect
PGHOST
PGPORT
PGUSER
PGPASSWORD
PGDATABASE
commands =
pytest
[testenv:docs]
description = Attempt to build docs with sphinx-build
whitelist_externals =
sphinx-build
make
setenv =
# This is just for Windows
# Prioritise make.bat over any make.exe which might be on PATH
PATHEXT=.BAT;.EXE
basepython = python3.8
extras = docs
commands =
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out/html" -W --keep-going -bhtml
sphinx-build -d "{toxworkdir}/docs_doctree" docs "{toxworkdir}/docs_out/doctest" -W --keep-going -bdoctest
[testenv:style]
description = Stylecheck the code with black to see if anything needs changes.
whitelist_externals =
make
setenv =
# This is just for Windows
# Prioritise make.bat over any make.exe which might be on PATH
PATHEXT=.BAT;.EXE
basepython = python3.8
extras = style
commands =
make stylediff