language: python
python:
  - "2.7"
  - "3.6"

addons:
  apt:
    packages:
    - libgmp3-dev
    - build-essential
    - libssl-dev
    - libffi-dev

install:
  - pip install tox-travis coverage
  - pushd .. && git clone https://github.com/lbryio/electrumx.git --branch lbryumx && popd
  - pushd .. && git clone https://github.com/lbryio/orchstr8.git && popd
  - pushd .. && git clone https://github.com/lbryio/lbryschema.git && popd
  - pushd .. && git clone https://github.com/lbryio/lbryumx.git && popd
  - pushd .. && git clone https://github.com/lbryio/torba.git && popd

script:
  - 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/.tox