diff --git a/.gitignore b/.gitignore index a044a8c..1e6aa92 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ /rtmbot.conf /plugins/** env +.tox \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..f8b358d --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +sudo: false +language: python +python: + - "3.5" +env: + matrix: + - TOX_ENV=py27 + - TOX_ENV=py34 + - TOX_ENV=py35 + - TOX_ENV=flake8 +cache: pip +install: + - "travis_retry pip install setuptools --upgrade" + - "travis_retry pip install tox" +script: + - tox -e $TOX_ENV +after_script: + - cat .tox/$TOX_ENV/log/*.log \ No newline at end of file diff --git a/requirements-dev.txt b/requirements-dev.txt new file mode 100644 index 0000000..c6513a4 --- /dev/null +++ b/requirements-dev.txt @@ -0,0 +1,3 @@ +pytest>=2.8.2 +pytest-pythonpath>=0.3 +tox>=1.8.0 \ No newline at end of file diff --git a/tests/test_example.py b/tests/test_example.py new file mode 100644 index 0000000..c8d72d0 --- /dev/null +++ b/tests/test_example.py @@ -0,0 +1,2 @@ +def test_example(): + assert True \ No newline at end of file diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..a3d40c5 --- /dev/null +++ b/tox.ini @@ -0,0 +1,23 @@ +[tox] +envlist= + py{27,34,35}, + flake8 +skipsdist=true + +[flake8] +max-line-length= 100 +exclude= tests/* + +[testenv] +commands=py.test {posargs:tests} +deps = + -r{toxinidir}/requirements-dev.txt +basepython = + py27: python2.7 + py34: python3.4 + py35: python3.5 + +[testenv:flake8] +basepython=python +deps=flake8 +commands=flake8 {toxinidir}/web3 \ No newline at end of file