sanic/tox.ini

99 lines
1.8 KiB
INI
Raw Permalink Normal View History

[tox]
GIT-2023: Enable GitHub Actions support (#2050) * GIT-2023: Enable GitHub Actions support * GIT-2023: fix tox runtime trigger * GIT-2023: add top level action name * GIT-2023: rename tox step name * GIT-2023: rename build task names * GIT-2023: remove macos and windows + nightly versions * GIT-2023: add macos and windows back to os matrix * GIT-2023: expermiental flag to conditionally skip failure * GIT-2023: enable using custom actions * GIT-2023: fix matrix config rendering type * GIT-2023: fix naming issue with os label * GIT-2023: enable type-checking env for tox * GIT-2023: enable pypy3.7 support * GIT-2023: enable pypy experimental flag * GIT-2023: add pypy tox env config * add max timeout of 5 min for pypy tests * GIT-2023: add timeout for each actions * GIT-2023: fix codeQL workflow actions * GIT-2023: limit test matrix to ubuntu and support on demand * GIT-2023: enable docker image publish on release * GIT-2023: fix on-demand pypy action * GIT-2023: enable pypi publish workflow * GIT-2023: enable verbose logs for py3.9 * GIT-2023: reduce py3.9 verbosity * GIT-2023: enable docs linter * GIT-2023: extend test matrix to include macos + windows * GIT-2023: move windows based workflow to standalone task * GIT-2023: fix windows test matrix * GIT-2023: mark py39-no-ext as flaky test * GIT-2023: mark flaky test * GIT-2023: make timeout internal to steps for ease of management * GIT-2023: rename image publish step name * GIT-2023: mark keep alive client timeout for linux only * GIT-2023: enable retries on test failure Co-authored-by: Adam Hopkins <admhpkns@gmail.com>
2021-04-06 21:32:01 +01:00
envlist = py37, py38, py39, pyNightly, pypy37, {py37,py38,py39,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking
2016-12-26 03:05:11 +00:00
[testenv]
2017-05-15 02:49:25 +01:00
usedevelop = True
setenv =
2021-02-22 11:20:58 +00:00
{py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UJSON=1
{py37,py38,py39,pyNightly}-no-ext: SANIC_NO_UVLOOP=1
deps =
sanic-testing>=0.6.0
2020-12-24 19:56:35 +00:00
coverage==5.3
pytest==5.2.1
2017-06-11 16:49:35 +01:00
pytest-cov
2017-08-09 06:21:40 +01:00
pytest-sanic
2017-05-15 02:49:25 +01:00
pytest-sugar
pytest-benchmark
2020-12-24 19:56:35 +00:00
chardet==3.*
2017-05-15 02:49:25 +01:00
beautifulsoup4
2020-12-24 19:56:35 +00:00
gunicorn==20.0.4
uvicorn
websockets>=9.0
commands =
pytest {posargs:tests --cov sanic}
- coverage combine --append
2017-08-10 15:55:38 +01:00
coverage report -m
coverage html -i
2018-10-14 02:10:43 +01:00
[testenv:lint]
deps =
flake8
2018-10-14 02:10:43 +01:00
black
isort>=5.0.0
bandit
commands =
flake8 sanic
black --config ./.black.toml --check --verbose sanic/
2021-02-15 12:01:32 +00:00
isort --check-only sanic --profile=black
2017-05-02 10:17:24 +01:00
[testenv:type-checking]
deps =
mypy>=0.901
types-ujson
commands =
mypy sanic
2017-05-02 10:17:24 +01:00
[testenv:check]
deps =
docutils
pygments
commands =
python setup.py check -r -s
[pytest]
filterwarnings =
ignore:.*async with lock.* instead:DeprecationWarning
2020-09-08 12:08:49 +01:00
addopts = --strict-markers
2020-09-27 08:46:51 +01:00
markers =
asyncio
[testenv:security]
deps =
bandit
commands =
bandit --recursive sanic --skip B404,B101 --exclude sanic/reloader_helpers.py
[testenv:docs]
platform = linux|linux2|darwin
whitelist_externals = make
deps =
sphinx>=2.1.2
sphinx_rtd_theme>=0.4.3
recommonmark>=0.5.0
docutils
pygments
2020-12-24 19:56:35 +00:00
gunicorn==20.0.4
commands =
make docs-test
[testenv:coverage]
usedevelop = True
deps =
sanic-testing>=0.6.0
coverage==5.3
pytest==5.2.1
pytest-cov
pytest-sanic
pytest-sugar
pytest-benchmark
chardet==3.*
beautifulsoup4
gunicorn==20.0.4
uvicorn
websockets>=9.0
commands =
pytest tests --cov=./sanic --cov-report=xml