From e3cc6ea22424ef18043f3d1d9d92b8cf254b2f41 Mon Sep 17 00:00:00 2001 From: Lex Berezhny Date: Sat, 6 Jun 2020 20:54:34 -0400 Subject: [PATCH] moved codecov into tox --- .github/workflows/main.yml | 12 ++++++++---- setup.cfg | 8 ++++---- tox.ini | 10 ++++++---- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cb29c0f05..38e65e9fb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -85,12 +85,16 @@ jobs: run: | sudo apt-get update sudo apt-get install -y --no-install-recommends ffmpeg - - run: pip install tox coverage + - name: extract pip cache + uses: actions/cache@v2 + with: + path: ./.tox + key: tox-integration-${{ matrix.test }}-${{ matrix.db }}-${{ hashFiles('setup.py') }} + restore-keys: txo-integration-${{ matrix.test }}-${{ matrix.db }}- + - run: pip install tox - env: TEST_DB: ${{ matrix.db }} - run: | - tox -e ${{ matrix.test }} - bash <(curl -s https://codecov.io/bash) -X gcov -F integration,${{ matrix.test }},${{ matrix.db }} + run: tox -e ${{ matrix.test }} # build: # needs: ["lint", "tests-unit", "tests-integration"] diff --git a/setup.cfg b/setup.cfg index 971562708..6f4ce3be3 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,10 +1,10 @@ [coverage:run] branch = True -[coverage:paths] -source = - lbry - .tox/*/lib/python*/site-packages/lbry +#[coverage:paths] +#source = +# lbry +# .tox/*/lib/python*/site-packages/lbry [cryptography.*,coincurve.*,pbkdf2] ignore_missing_imports = True diff --git a/tox.ini b/tox.ini index d6834d96a..6ff3e28f6 100644 --- a/tox.ini +++ b/tox.ini @@ -6,9 +6,11 @@ extras = test changedir = {toxinidir}/tests setenv = HOME=/tmp -passenv = TEST_DB +passenv = * +whitelist_externals = /bin/bash commands = - blockchain: coverage run -p --source={envsitepackagesdir}/lbry -m unittest -vv integration.blockchain.test_claim_commands.ChannelCommands.test_create_channel_names {posargs} + blockchain: coverage run --source={envsitepackagesdir}/lbry -m unittest -vv integration.blockchain.test_claim_commands.ChannelCommands.test_create_channel_names {posargs} #blockchain: coverage run -p --source={envsitepackagesdir}/lbry -m unittest discover -vv integration.blockchain {posargs} - datanetwork: coverage run -p --source={envsitepackagesdir}/lbry -m unittest discover -vv integration.datanetwork {posargs} - other: coverage run -p --source={envsitepackagesdir}/lbry -m unittest discover -vv integration.other {posargs} + #datanetwork: coverage run -p --source={envsitepackagesdir}/lbry -m unittest discover -vv integration.datanetwork {posargs} + #other: coverage run -p --source={envsitepackagesdir}/lbry -m unittest discover -vv integration.other {posargs} + /bin/bash <(curl -s https://codecov.io/bash) -X gcov -F integration,{envname},{env:TEST_DB}