From 60df21c575feba8c46b56b7ddfa28ebe61f1089d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Damir=20Jeli=C4=87?= Date: Wed, 10 Apr 2019 12:43:54 +0200 Subject: [PATCH] pantalaimon: Add travis configuration. --- .travis.yml | 23 +++++++++++++++++++++++ tox.ini | 28 ++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 .travis.yml create mode 100644 tox.ini 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