diff --git a/.travis.yml b/.travis.yml index e1a76615c..e44da68f5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ dist: xenial sudo: true language: python - python: "3.7" jobs: @@ -16,25 +15,25 @@ jobs: script: - pylint --rcfile=setup.cfg torba - mypy torba + after_success: skip - - stage: test - python: - - "3.6" - - "3.7" - name: "Unit Tests" + - &unit-tests + stage: unit tests install: - - pip install tox-travis coverage - script: tox -e unit - after_success: - - coverage combine tests/ - - bash <(curl -s https://codecov.io/bash) + - pip install tox-travis + script: TESTTYPE=unit tox + - <<: *unit-tests + python: "3.6" - - name: "Integration Tests" + - &integration-tests + stage: integration tests install: - - pip install tox-travis coverage + - pip install tox-travis - pushd .. && git clone https://github.com/lbryio/electrumx.git --branch lbryumx && popd - pushd .. && git clone https://github.com/lbryio/orchstr8.git && popd - script: tox -e integration - after_success: - - coverage combine tests/ - - bash <(curl -s https://codecov.io/bash) + script: TESTTYPE=integration tox + +after_success: + - pip install coverage + - coverage combine tests/ + - bash <(curl -s https://codecov.io/bash) diff --git a/tox.ini b/tox.ini index feaffd283..7037984db 100644 --- a/tox.ini +++ b/tox.ini @@ -2,6 +2,11 @@ #envlist = unit,integration-{torba.coin.bitcoincash,torba.coin.bitcoinsegwit} envlist = py37-unit,py37-integration-torba.coin.bitcoinsegwit +[travis:env] +TESTTYPE = + unit: unit + integration: integration + [testenv] deps = coverage @@ -9,7 +14,8 @@ deps = integration: ../electrumx extras = test changedir = {toxinidir}/tests -setenv = integration: LEDGER={envname} +setenv = + integration: LEDGER={envname} commands = unit: coverage run -p --source={envsitepackagesdir}/torba -m twisted.trial unit integration: orchstr8 download