added tox

This commit is contained in:
Lex Berezhny 2018-07-06 18:31:35 -04:00 committed by Jack Robison
parent 03d2d0e237
commit 425c952293
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2
4 changed files with 58 additions and 35 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@
/docs_build
/lbry-venv
.tox/
.idea/
.coverage
.DS_Store

View file

@ -1,42 +1,35 @@
os: linux
dist: trusty
language: python
python: 2.7
python:
- "2.7"
- "3.6"
branches:
except:
- gh-pages
addons:
apt:
packages:
- libgmp3-dev
- build-essential
- libssl-dev
- libffi-dev
install:
- pip install tox-travis coverage pylint
- pushd .. && git clone https://github.com/lbryio/electrumx.git --branch packages && popd
- pushd .. && git clone https://github.com/lbryio/orchstr8.git && popd
- pushd .. && git clone https://github.com/lbryio/lbryumx.git && popd
- pushd .. && git clone https://github.com/lbryio/torba.git && popd
script:
- pylint lbrynet
- tox
- rvm install ruby-2.3.1
- rvm use 2.3.1 && gem install danger --version '~> 4.0' && danger
after_success:
- coverage combine tests/
- bash <(curl -s https://codecov.io/bash)
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/pip
- $TRAVIS_BUILD_DIR/cache/wheel
addons:
#srcclr:
# debug: true
apt:
packages:
- libgmp3-dev
- build-essential
- git
- libssl-dev
- libffi-dev
before_install:
- virtualenv venv
- source venv/bin/activate
install:
- pip install -U pip==9.0.3
- pip install -r requirements.txt
- pip install -r requirements_testing.txt
- pip install .
script:
- pip install mock pylint
- pylint lbrynet
- PYTHONPATH=. trial lbrynet.tests
- rvm install ruby-2.3.1
- rvm use 2.3.1 && gem install danger --version '~> 4.0' && danger
- $TRAVIS_BUILD_DIR/.tox

View file

@ -21,7 +21,9 @@ requires = [
'base58',
'envparse',
'jsonrpc',
'cryptography==2.2.2',
'lbryschema==0.0.16',
'torba',
'miniupnpc',
'txupnp==0.0.1a11',
'pyyaml',
@ -30,6 +32,7 @@ requires = [
'zope.interface',
'treq',
'docopt',
'colorama==0.3.7',
'six',
]
@ -66,4 +69,10 @@ setup(
install_requires=requires,
entry_points={'console_scripts': console_scripts},
zip_safe=False,
extras_require={
'test': (
'mock>=2.0,<3.0',
'faker>=0.8,<1.0'
)
}
)

20
tox.ini Normal file
View file

@ -0,0 +1,20 @@
[tox]
envlist = py27-unit,py36-integration
[testenv]
deps =
coverage
../torba
../lbryschema
integration: ../electrumx
integration: ../orchstr8
integration: ../lbryumx
extras = test
changedir = {toxinidir}/tests
setenv =
HOME=/tmp
integration: LEDGER=lbrynet.wallet
commands =
unit: coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial functional unit
integration: orchstr8 download
integration: coverage run -p --source={envsitepackagesdir}/lbrynet -m twisted.trial --reactor=asyncio integration.wallet.test_transactions