From 8b145cb1d825e135068885368384352f21b0e44f Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Thu, 20 Jun 2019 15:26:54 -0400 Subject: [PATCH] combined .travis.yml --- .travis.yml | 64 +++++++++++++++++++++++++-------------------------- Makefile | 8 +++++++ lbry/setup.py | 2 +- 3 files changed, 41 insertions(+), 33 deletions(-) create mode 100644 Makefile diff --git a/.travis.yml b/.travis.yml index b498cdbb4..bf95861b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,54 +3,54 @@ dist: xenial language: python python: "3.7" -env: - global: - # must also be updated in wine_build.sh - - TORBA=master - jobs: include: - stage: code quality - name: "pylint lbrynet" + name: "pylint & mypy" install: - pip install astroid pylint - - pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - - pip install -e . - script: pylint lbrynet + - make install + script: make lint - stage: test - name: "Unit Tests" + name: "LBRY Unit Tests" install: - pip install coverage - - pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - - pip install -e . + - make install script: - - HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -vv tests.unit + - cd lbry && HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -vv tests.unit after_success: - - coverage combine - - bash <(curl -s https://codecov.io/bash) + - cd lbry && coverage combine + - cd lbry && bash <(curl -s https://codecov.io/bash) - - name: "Integration Tests" + - name: "Torba Unit Tests" + env: TESTTYPE=unit + install: + - pip install tox-travis + script: cd torba && tox + after_success: + - pip install coverage + - cd torba && coverage combine tests/ + - cd torba && bash <(curl -s https://codecov.io/bash) + + - name: "LBRY Integration Tests" install: - pip install tox-travis coverage - - pushd .. && git clone --single-branch --branch ${TORBA} https://github.com/lbryio/torba.git && popd - - script: tox + script: cd lbry && tox after_success: - - coverage combine tests/ - - bash <(curl -s https://codecov.io/bash) + - cd lbry && coverage combine + - cd lbry && bash <(curl -s https://codecov.io/bash) - name: "Run Examples" install: - pip install coverage - - pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - - pip install -e . + - make install script: - - HOME=/tmp coverage run -p --source=lbrynet scripts/generate_json_api.py + - cd lbry && HOME=/tmp coverage run -p --source=lbrynet scripts/generate_json_api.py after_success: - - coverage combine - - bash <(curl -s https://codecov.io/bash) + - cd lbry && coverage combine + - cd lbry && bash <(curl -s https://codecov.io/bash) - stage: build name: "Windows" @@ -85,14 +85,14 @@ jobs: env: OS=linux install: - pip3 install pyinstaller - - pip3 install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - python3 scripts/set_build.py - - pip3 install -e . + - cd torba && pip3 install -e . + - cd lbry && pip3 install -e . script: - - pyinstaller -F -n lbrynet lbrynet/extras/cli.py - - chmod +x dist/lbrynet - - zip -j dist/lbrynet-${OS}.zip dist/lbrynet - - ./dist/lbrynet --version + - cd lbry && pyinstaller -F -n lbrynet lbrynet/extras/cli.py + - chmod +x lbry/dist/lbrynet + - zip -j dist/lbrynet-${OS}.zip lbry/dist/lbrynet + - ./lbry/dist/lbrynet --version deploy: provider: releases api_key: $GITHUB_OAUTH_TOKEN diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..dbb2a2d06 --- /dev/null +++ b/Makefile @@ -0,0 +1,8 @@ +install: + cd torba && pip install -e . + cd lbry && pip install -e . + +lint: + cd torba && pylint --rcfile=setup.cfg torba + cd torba && mypy --ignore-missing-imports torba + cd lbry && pylint lbrynet diff --git a/lbry/setup.py b/lbry/setup.py index c590f71bb..48ac601f1 100644 --- a/lbry/setup.py +++ b/lbry/setup.py @@ -23,7 +23,7 @@ setup( 'console_scripts': 'lbrynet=lbrynet.extras.cli:main' }, install_requires=[ - 'torba==0.5.7', + 'torba', 'aiohttp==3.5.4', 'aioupnp==0.0.12', 'appdirs==1.4.3',