lbry-sdk/.travis.yml

141 lines
4.4 KiB
YAML
Raw Normal View History

sudo: required
2018-07-22 01:32:05 +02:00
dist: xenial
2017-02-15 18:10:40 +01:00
language: python
2018-07-29 06:24:38 +02:00
python: "3.7"
2017-02-15 18:10:40 +01:00
2018-07-22 01:32:05 +02:00
jobs:
include:
2017-10-25 18:26:04 +02:00
2018-07-27 01:18:48 +02:00
- stage: code quality
name: "pylint lbrynet"
install:
2019-02-28 18:04:02 +01:00
- pip install astroid pylint
2019-04-27 20:23:56 +02:00
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
- pip install -e .
2018-07-27 01:18:48 +02:00
script: pylint lbrynet
- stage: test
2018-11-26 22:52:27 +01:00
name: "Unit Tests"
2018-07-27 01:18:48 +02:00
install:
- pip install coverage
2019-04-27 20:23:56 +02:00
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
2019-01-24 00:22:10 +01:00
- pip install -e .
script:
- HOME=/tmp coverage run -p --source=lbrynet -m unittest discover -vv tests.unit
2018-07-27 23:56:13 +02:00
after_success:
- coverage combine
2018-07-27 23:56:13 +02:00
- bash <(curl -s https://codecov.io/bash)
2019-01-24 00:04:16 +01:00
- name: "Integration Tests"
cache: false
2019-01-24 00:04:16 +01:00
install:
- pip install tox-travis coverage
- pushd .. && git clone --single-branch --branch sqltrie https://github.com/lbryio/torba.git && popd
2019-01-24 00:04:16 +01:00
script: tox
after_success:
- coverage combine tests/
- bash <(curl -s https://codecov.io/bash)
2019-04-06 22:29:59 +02:00
- name: "Run Examples"
install:
- pip install coverage
2019-04-27 20:23:56 +02:00
- pip install git+https://github.com/lbryio/torba.git@sqltrie#egg=torba
2019-04-06 22:29:59 +02:00
- pip install -e .
script:
2019-04-06 22:38:28 +02:00
- HOME=/tmp coverage run -p --source=lbrynet scripts/generate_json_api.py
2019-04-06 22:29:59 +02:00
after_success:
- coverage combine
- bash <(curl -s https://codecov.io/bash)
- stage: build
2018-07-27 01:18:48 +02:00
name: "Windows"
language: generic
2018-07-27 01:18:48 +02:00
services:
- docker
install:
2018-11-26 22:17:36 +01:00
- docker pull lbry/pyinstaller34_32bits:py371
2018-07-27 01:18:48 +02:00
script:
2018-12-11 00:52:13 +01:00
- python scripts/set_build.py
2018-11-26 22:17:36 +01:00
- docker run -v "$(pwd):/src/lbry" lbry/pyinstaller34_32bits:py371 lbry/scripts/wine_build.sh
2018-09-27 01:18:53 +02:00
- sudo zip -j dist/lbrynet-windows.zip dist/lbrynet.exe
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: dist/lbrynet-windows.zip
skip_cleanup: true
overwrite: true
draft: true
2018-12-12 06:10:39 +01:00
on:
tags: true
2018-07-27 01:18:48 +02:00
addons:
artifacts:
working_dir: dist
paths:
2018-09-26 23:52:21 +02:00
- lbrynet-windows.zip
2018-07-27 01:18:48 +02:00
target_paths:
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})
2018-07-27 01:18:48 +02:00
2018-07-29 06:16:57 +02:00
- &build
name: "Linux"
env: OS=linux
2018-07-27 00:08:26 +02:00
install:
2018-07-27 01:13:14 +02:00
- pip3 install pyinstaller
- pip3 install git+https://github.com/lbryio/torba.git
- python3 scripts/set_build.py
2018-07-27 01:13:14 +02:00
- pip3 install -e .
script:
2018-11-04 21:51:27 +01:00
- pyinstaller -F -n lbrynet lbrynet/extras/cli.py
2018-09-26 21:54:40 +02:00
- chmod +x dist/lbrynet
2018-09-26 23:52:21 +02:00
- zip -j dist/lbrynet-${OS}.zip dist/lbrynet
- ./dist/lbrynet --version
deploy:
provider: releases
api_key: $GITHUB_OAUTH_TOKEN
file: dist/lbrynet-${OS}.zip
skip_cleanup: true
overwrite: true
draft: true
2018-12-12 06:10:39 +01:00
on:
tags: true
2018-07-27 00:08:26 +02:00
addons:
artifacts:
working_dir: dist
paths:
2018-09-26 23:20:24 +02:00
- lbrynet-${OS}.zip
# artifact uploader thinks lbrynet is a directory, https://github.com/travis-ci/artifacts/issues/78
2018-07-27 00:08:26 +02:00
target_paths:
- /daemon/build-${TRAVIS_BUILD_NUMBER}_commit-${TRAVIS_COMMIT:0:7}_branch-${TRAVIS_BRANCH}$([ ! -z ${TRAVIS_TAG} ] && echo _tag-${TRAVIS_TAG})
2018-07-29 06:16:57 +02:00
- <<: *build
name: "Mac"
os: osx
osx_image: xcode8.3
2018-07-29 06:16:57 +02:00
language: generic
env: OS=mac
2018-11-27 02:17:01 +01:00
cache: false
before_install:
- brew upgrade python || true
- brew upgrade python || true
- if: tag IS present
stage: build
name: "Wallet Server Docker Image - Tagged Release"
script:
- set -e
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- travis_retry docker build -t lbry/wallet-server:$TRAVIS_TAG -f scripts/Dockerfile.wallet_server .
- docker push lbry/wallet-server:$TRAVIS_TAG
2019-03-19 00:32:09 +01:00
- if: tag IS blank AND branch = master AND NOT type IN (pull_request)
stage: build
name: "Wallet Server Docker Image - Master"
script:
- set -e
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- travis_retry docker build -t lbry/wallet-server:master -f scripts/Dockerfile.wallet_server .
- docker push lbry/wallet-server:master
2018-07-07 00:31:35 +02:00
cache:
directories:
- $HOME/.cache/pip
- $HOME/Library/Caches/pip
- $TRAVIS_BUILD_DIR/.tox