diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3678fd8 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,23 @@ +language: python +dist: xenial +sudo: false +before_install: + - wget https://matrix.org/git/olm/snapshot/olm-2.3.0.tar.bz2 + - tar -xvf olm-2.3.0.tar.bz2 + - pushd olm-2.3.0 && make && sudo make PREFIX="/usr" install && popd + - rm -r olm-2.3.0 + +matrix: + include: + - python: 3.6 + env: TOXENV=py36 + - python: 3.7 + env: TOXENV=py37 + - python: 3.7 + env: TOXENV=coverage + +install: pip install tox-travis +script: tox + +after_success: + - bash <(curl -s https://codecov.io/bash) diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..572478d --- /dev/null +++ b/tox.ini @@ -0,0 +1,28 @@ +# content of: tox.ini , put in same dir as setup.py +[tox] +envlist = py36,py37,coverage +[testenv] +basepython = + py36: python3.6 + py37: python3.7 + py3: python3.7 + +deps = -rtest-requirements.txt +install_command = pip install {opts} {packages} + +passenv = TOXENV CI TRAVIS TRAVIS_* +commands = pytest +usedevelop = True + +[testenv:coverage] +basepython = python3.7 +commands = + py.test --cov=nio --cov-report term-missing + coverage xml + coverage report --show-missing + codecov -e TOXENV +deps = + coverage + codecov>=1.4.0 +setenv = + COVERAGE_FILE=.coverage