sanic/tox.ini
Adam Hopkins 7c180376d6
Add Simple Server and Coverage action (#2168)
* Add Simple Server and CodeCov action

* Remove token

* Codecov to tox.ini

* fix tox

* Set coverage location

* Add ignore to codecov

* Try glob ignore

* Setup CodeClimate

* Allow coverage check to run

* Change coverage check

* Add codeclimate exclusions
2021-06-21 14:53:09 +03:00

99 lines
1.8 KiB
INI

[tox]
envlist = py37, py38, py39, pyNightly, pypy37, {py37,py38,py39,pyNightly,pypy37}-no-ext, lint, check, security, docs, type-checking
[testenv]
usedevelop = True
setenv =
{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
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 {posargs:tests --cov sanic}
- coverage combine --append
coverage report -m
coverage html -i
[testenv:lint]
deps =
flake8
black
isort>=5.0.0
bandit
commands =
flake8 sanic
black --config ./.black.toml --check --verbose sanic/
isort --check-only sanic --profile=black
[testenv:type-checking]
deps =
mypy>=0.901
types-ujson
commands =
mypy sanic
[testenv:check]
deps =
docutils
pygments
commands =
python setup.py check -r -s
[pytest]
filterwarnings =
ignore:.*async with lock.* instead:DeprecationWarning
addopts = --strict-markers
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
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