diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..a4b561c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +pathspec >= 0.5.3 +pyyaml +setuptools diff --git a/tests/requirements.txt b/tests/requirements.txt new file mode 100644 index 0000000..2949646 --- /dev/null +++ b/tests/requirements.txt @@ -0,0 +1,6 @@ +pyyaml +coveralls +flake8 +flake8-import-order +doc8 +sphinx; python_version > '2.7' diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..50d5ca2 --- /dev/null +++ b/tox.ini @@ -0,0 +1,30 @@ +[tox] +envlist = py27, py34, py35, py36, py37, py38, nightly +minversion = 3.15 + +[base] +commands = + - /bin/sh -c 'yamllint -c {toxinidir}/yamllint/conf/default.yaml --strict `git ls-files \*.yaml \*.yml`' + coverage run --source=yamllint setup.py test + +[testenv] +deps = + -r {toxinidir}/requirements.txt + -r {toxinidir}/tests/requirements.txt + +# https://tox.readthedocs.io/en/latest/config.html#substitution-for-values-from-other-sections +commands = + /bin/sh -c 'doc8 `git ls-files \*.rst`' + {[base]commands} + python setup.py build_sphinx + +[testenv:py27] +commands = + flake8 . + {[base]commands} + +# https://tox.readthedocs.io/en/latest/config.html#generative-section-names +[testenv:py3{4,5,6,7,8}] +commands = + flake8 . + {[testenv]commands}