1
0
mirror of https://github.com/bigchaindb/bigchaindb.git synced 2024-06-26 03:06:43 +02:00
This commit is contained in:
Sylvain Bellemare 2016-12-07 18:42:26 +01:00 committed by Sylvain Bellemare
parent 1223695b36
commit aa436ced6e
7 changed files with 88 additions and 18 deletions

7
.ci/travis-after-success.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e -x
if [ "${TOXENV}" == "py35" ]; then
codecov
fi

8
.ci/travis-before-install.sh Executable file
View File

@ -0,0 +1,8 @@
#!/bin/bash
if [ "${TOXENV}" == "py34" ] || [ "${TOXENV}" == "py35" ]; then
source /etc/lsb-release
echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | tee -a /etc/apt/sources.list.d/rethinkdb.list
wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | apt-key add -
apt-get update -qq
fi

7
.ci/travis-before-script.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -e -x
if [ "${TOXENV}" == "py34" ] || [ "${TOXENV}" == "py35" ]; then
rethinkdb --daemon
fi

11
.ci/travis-install.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/bash
set -e -x
pip install --upgrade pip
pip install --upgrade tox
if [ "${TOXENV}" == "py34" ] || [ "${TOXENV}" == "py35" ]; then
sudo apt-get install rethinkdb
pip install --upgrade codecov
fi

View File

@ -1,25 +1,19 @@
sudo: required
language: python
cache: pip
python:
- 3.4
- 3.5
before_install:
- source /etc/lsb-release
- echo "deb http://download.rethinkdb.com/apt $DISTRIB_CODENAME main" | sudo tee -a /etc/apt/sources.list.d/rethinkdb.list
- wget -qO- https://download.rethinkdb.com/apt/pubkey.gpg | sudo apt-key add -
- sudo apt-get update -qq
env:
- TOXENV=py34
- TOXENV=py35
- TOXENV=flake8
- TOXENV=docsroot
- TOXENV=docsserver
install:
- sudo apt-get install rethinkdb
- pip install -e .[test]
- pip install codecov
before_install: sudo .ci/travis-before-install.sh
before_script:
- flake8 --max-line-length 119 bigchaindb/
- rethinkdb --daemon
install: .ci/travis-install.sh
script: py.test -n auto -s -v --cov=bigchaindb
before_script: .ci/travis-before-script.sh
after_success: codecov
script: tox -e ${TOXENV}
after_success: .ci/travis-after-success.sh

View File

@ -49,6 +49,7 @@ tests_require = [
'pytest-cov>=2.2.1',
'pytest-xdist',
'pytest-flask',
'tox',
] + docs_require
benchmarks_require = [

42
tox.ini Normal file
View File

@ -0,0 +1,42 @@
[tox]
skipsdist = true
envlist = py34, py35, flake8, docsroot, docsserver
[base]
basepython = python3.5
deps = pip>=9.0.1
[testenv]
usedevelop = True
setenv =
PYTHONPATH = {toxinidir}:{toxinidir}/bigchaindb
deps = {[base]deps}
extras = test
commands = pytest -v -n auto --cov=bigchaindb --basetemp={envtmpdir}
[testenv:flake8]
basepython = {[base]basepython}
deps =
{[base]deps}
flake8
skip_install = True
extras = None
commands = flake8 --max-line-length 119 bigchaindb
[testenv:docsroot]
basepython = {[base]basepython}
changedir = docs/root/source
deps =
{[base]deps}
-r{toxinidir}/docs/root/requirements.txt
extras = None
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
[testenv:docsserver]
basepython = {[base]basepython}
changedir = docs/server/source
deps =
{[base]deps}
-r{toxinidir}/docs/server/requirements.txt
extras = None
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html