enhancement: make possible to run tests and related stuff using tox

Make possible to run tests (python setup.py test) and other related
stuff (flake8, doc8 and yamllint) using tox.

Signed-off-by: Satoru SATOH <satoru.satoh@gmail.com>
This commit is contained in:
Satoru SATOH
2020-09-04 02:13:47 +09:00
parent 597e88bb7b
commit 11d90dce62
3 changed files with 22 additions and 0 deletions

2
requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
pathspec >= 0.5.3
pyyaml

2
tests/requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
flake8
doc8

18
tox.ini Normal file
View File

@@ -0,0 +1,18 @@
[tox]
envlist = py27, py34, py35, py36, py37, py38
[testenv]
deps =
-r {toxinidir}/requirements.txt
-r {toxinidir}/tests/requirements.txt
setenv =
PATH = {toxworkdir}/bin{:}{env:PATH}
commands =
flake8 .
/bin/sh -c 'doc8 `git ls-files *.rst`'
/bin/sh -c 'yamllint --strict `git ls-files *.yaml *.yml`'
python setup.py test
# vim:sw=4:ts=4:et: