integration coverage
This commit is contained in:
parent
54e83daa59
commit
cb5250f630
3 changed files with 59 additions and 52 deletions
94
.github/workflows/main.yml
vendored
94
.github/workflows/main.yml
vendored
|
@ -60,8 +60,58 @@ jobs:
|
|||
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
||||
coveralls
|
||||
|
||||
tests-integration:
|
||||
name: "tests / integration"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
test:
|
||||
# - datanetwork
|
||||
- blockchain
|
||||
# - other
|
||||
db:
|
||||
- sqlite
|
||||
# - postgres
|
||||
# services:
|
||||
# postgres:
|
||||
# image: postgres:12
|
||||
# env:
|
||||
# POSTGRES_USER: postgres
|
||||
# POSTGRES_PASSWORD: postgres
|
||||
# POSTGRES_DB: postgres
|
||||
# ports:
|
||||
# - 5432:5432
|
||||
# options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: '3.7'
|
||||
- if: matrix.test == 'other'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends ffmpeg
|
||||
- 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 }}
|
||||
- env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COVERALLS_PARALLEL: true
|
||||
name: Submit to coveralls
|
||||
run: |
|
||||
pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip
|
||||
coverage combine tests
|
||||
coveralls
|
||||
|
||||
coveralls-finished:
|
||||
needs: tests-unit
|
||||
needs: ["tests-unit", "tests-integration"]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Coveralls Finished
|
||||
|
@ -70,48 +120,6 @@ jobs:
|
|||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
parallel-finished: true
|
||||
|
||||
# tests-integration:
|
||||
# name: "tests / integration"
|
||||
# runs-on: ubuntu-latest
|
||||
# strategy:
|
||||
# matrix:
|
||||
# test:
|
||||
## - datanetwork
|
||||
# - blockchain
|
||||
## - other
|
||||
# db:
|
||||
# - sqlite
|
||||
## - postgres
|
||||
## services:
|
||||
## postgres:
|
||||
## image: postgres:12
|
||||
## env:
|
||||
## POSTGRES_USER: postgres
|
||||
## POSTGRES_PASSWORD: postgres
|
||||
## POSTGRES_DB: postgres
|
||||
## ports:
|
||||
## - 5432:5432
|
||||
## options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||
# steps:
|
||||
# - uses: actions/checkout@v1
|
||||
# - uses: actions/setup-python@v1
|
||||
# with:
|
||||
# python-version: '3.7'
|
||||
# - if: matrix.test == 'other'
|
||||
# run: |
|
||||
# sudo apt-get update
|
||||
# sudo apt-get install -y --no-install-recommends ffmpeg
|
||||
# - 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 }}
|
||||
|
||||
# build:
|
||||
# needs: ["lint", "tests-unit", "tests-integration"]
|
||||
# name: "build"
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
[coverage:run]
|
||||
source = lbry
|
||||
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
|
||||
|
|
8
tox.ini
8
tox.ini
|
@ -1,17 +1,15 @@
|
|||
[testenv]
|
||||
deps =
|
||||
coverage
|
||||
codecov
|
||||
|
||||
extras = test
|
||||
changedir = {toxinidir}/tests
|
||||
setenv =
|
||||
HOME=/tmp
|
||||
passenv = *
|
||||
whitelist_externals = /bin/bash
|
||||
passenv =
|
||||
TEST_DB
|
||||
commands =
|
||||
blockchain: coverage run --source={envsitepackagesdir}/lbry -m unittest -vv integration.blockchain.test_claim_commands.ChannelCommands.test_create_channel_names {posargs}
|
||||
blockchain: coverage run -p --rcfile={toxinidir}/setup.cfg -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}
|
||||
codecov -F integration,{envname},{env:TEST_DB}
|
||||
|
|
Loading…
Reference in a new issue