combined .travis.yml

This commit is contained in:
Lex Berezhny 2019-06-20 15:26:54 -04:00
parent 85d7adc0b5
commit 8b145cb1d8
3 changed files with 41 additions and 33 deletions

View file

@ -3,54 +3,54 @@ dist: xenial
language: python language: python
python: "3.7" python: "3.7"
env:
global:
# must also be updated in wine_build.sh
- TORBA=master
jobs: jobs:
include: include:
- stage: code quality - stage: code quality
name: "pylint lbrynet" name: "pylint & mypy"
install: install:
- pip install astroid pylint - pip install astroid pylint
- pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - make install
- pip install -e . script: make lint
script: pylint lbrynet
- stage: test - stage: test
name: "Unit Tests" name: "LBRY Unit Tests"
install: install:
- pip install coverage - pip install coverage
- pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - make install
- pip install -e .
script: 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: after_success:
- coverage combine - cd lbry && coverage combine
- bash <(curl -s https://codecov.io/bash) - 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: install:
- pip install tox-travis coverage - pip install tox-travis coverage
- pushd .. && git clone --single-branch --branch ${TORBA} https://github.com/lbryio/torba.git && popd script: cd lbry && tox
script: tox
after_success: after_success:
- coverage combine tests/ - cd lbry && coverage combine
- bash <(curl -s https://codecov.io/bash) - cd lbry && bash <(curl -s https://codecov.io/bash)
- name: "Run Examples" - name: "Run Examples"
install: install:
- pip install coverage - pip install coverage
- pip install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba - make install
- pip install -e .
script: 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: after_success:
- coverage combine - cd lbry && coverage combine
- bash <(curl -s https://codecov.io/bash) - cd lbry && bash <(curl -s https://codecov.io/bash)
- stage: build - stage: build
name: "Windows" name: "Windows"
@ -85,14 +85,14 @@ jobs:
env: OS=linux env: OS=linux
install: install:
- pip3 install pyinstaller - pip3 install pyinstaller
- pip3 install git+https://github.com/lbryio/torba.git@${TORBA}#egg=torba
- python3 scripts/set_build.py - python3 scripts/set_build.py
- pip3 install -e . - cd torba && pip3 install -e .
- cd lbry && pip3 install -e .
script: script:
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py - cd lbry && pyinstaller -F -n lbrynet lbrynet/extras/cli.py
- chmod +x dist/lbrynet - chmod +x lbry/dist/lbrynet
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet - zip -j dist/lbrynet-${OS}.zip lbry/dist/lbrynet
- ./dist/lbrynet --version - ./lbry/dist/lbrynet --version
deploy: deploy:
provider: releases provider: releases
api_key: $GITHUB_OAUTH_TOKEN api_key: $GITHUB_OAUTH_TOKEN

8
Makefile Normal file
View file

@ -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

View file

@ -23,7 +23,7 @@ setup(
'console_scripts': 'lbrynet=lbrynet.extras.cli:main' 'console_scripts': 'lbrynet=lbrynet.extras.cli:main'
}, },
install_requires=[ install_requires=[
'torba==0.5.7', 'torba',
'aiohttp==3.5.4', 'aiohttp==3.5.4',
'aioupnp==0.0.12', 'aioupnp==0.0.12',
'appdirs==1.4.3', 'appdirs==1.4.3',