test passing

This commit is contained in:
manolodewiner 2018-03-29 18:57:12 +02:00
parent 5a96c7fdbe
commit 3d232c6fc2
8 changed files with 94 additions and 13 deletions

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

@ -0,0 +1,9 @@
#!/bin/bash
sudo apt-get update
sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
sudo rm /usr/local/bin/docker-compose
curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
chmod +x docker-compose
sudo mv docker-compose /usr/local/bin

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

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose up -d bigchaindb

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

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose build --no-cache bigchaindb js-bigchaindb-driver

5
.ci/travis_script.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
docker-compose run --rm js-bigchaindb-driver yarn test

View File

@ -5,23 +5,24 @@ services:
language: node_js
node_js: 7
cache:
directories:
- node_modules
env:
global:
- DOCKER_COMPOSE_VERSION=1.19.0
before_install:
- docker run -d -p 27017:27017 mongo:3.4 --replSet=bigchain-rs
- docker run -d -p 9984:9984
-e BIGCHAINDB_KEYPAIR_PUBLIC=8wHUvvraRo5yEoJAt66UTZaFq9YZ9tFFwcauKPDtjkGw
-e BIGCHAINDB_KEYPAIR_PRIVATE=5C5Cknco7YxBRP9AgB1cbUVTL4FAcooxErLygw1DeG2D
-e BIGCHAINDB_DATABASE_BACKEND=mongodb
-e BIGCHAINDB_DATABASE_HOST=172.17.0.1
bigchaindb/bigchaindb:master
start
- gem install cowsay
- npm install -g codecov
- .ci/travis-before-install
install:
- .ci/travis-install.sh
before_script:
- .ci/travis-before-script.sh
- gem install cowsay
- npm install -g codecov
script: yarn test

View File

@ -0,0 +1,17 @@
# This is a TOML config file.
# For more information, see https://github.com/toml-lang/toml
proxy_app = "tcp://bigchaindb:46658"
moniker = "anonymous"
fast_sync = true
db_backend = "leveldb"
log_level = "state:debug,*:error"
[consensus]
create_empty_blocks = false
[rpc]
laddr = "tcp://0.0.0.0:46657"
[p2p]
laddr = "tcp://0.0.0.0:46656"

39
docker-compose.yml Normal file
View File

@ -0,0 +1,39 @@
version: '2.1'
services:
mongodb:
image: mongo:3.4.13
ports:
- "27017"
command: mongod
bigchaindb:
depends_on:
- mongodb
- tendermint
image: bigchaindb/bigchaindb:master
environment:
BIGCHAINDB_DATABASE_HOST: mongodb
BIGCHAINDB_DATABASE_PORT: 27017
BIGCHAINDB_SERVER_BIND: 0.0.0.0:9984
BIGCHAINDB_WSSERVER_HOST: 0.0.0.0
BIGCHAINDB_TENDERMINT_HOST: tendermint
BIGCHAINDB_TENDERMINT_PORT: 46657
ports:
- "9984:9984"
- "9985:9985"
- "46658"
healthcheck:
test: ["CMD", "bash", "-c", "curl http://bigchaindb:9984 && curl http://tendermint:46657/abci_query"]
interval: 3s
timeout: 5s
retries: 3
command: -l DEBUG start
tendermint:
image: tendermint/tendermint:0.12
volumes:
- ./compose/tendermint/tmdata/config.toml:/tendermint/config.toml
entrypoint: ''
ports:
- "46656"
- "46657"
command: bash -c "tendermint init && tendermint node"

View File

@ -50,7 +50,7 @@
"babel-runtime": "^6.22.0",
"cross-env": "^5.0.1",
"eslint": "^4.1.1",
"eslint-config-ascribe": "^3.0.4",
"eslint-config-ascribe": "^3.0.5",
"eslint-plugin-import": "^2.2.0",
"husky": "^0.14.0",
"lint-staged": "^6.0.0",