diff --git a/.travis.yml b/.travis.yml index 9b5cfd7f..7888d463 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,43 @@ if: (branch = development) OR (branch = master) OR (type = pull_request) OR (tag IS present) +sudo: required +services: + - docker language: node_js node_js: - - "8" + - "9" os: - linux +env: + - DOCKER_COMPOSE_VERSION=1.22.0 before_install: + # Install custom docker-compose version + - 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 + # Shut down postgres because it blocks our db container's port map to :5432 + # it comes enabled by default in docker-compose + - sudo service postgresql stop + # Wait for it to stop + - while sudo lsof -Pi :5432 -sTCP:LISTEN -t; do sleep 1; done # Needed to deploy pull request and releases - sudo apt-get -y install python-pip python-dev - pip install awscli --upgrade --user before_script: # Used in the tests of the project - export NODE_ENV=testing + - git clone https://github.com/gnosis/safe-transaction-history.git + - cd safe-transaction-history + - git checkout develop + - docker-compose build + - docker-compose up -d + # Give some time to docker to enable all services + - sleep 15 + - cd .. after_success: + - cd safe-transaction-history + - docker-compose stop + - cd .. - | if [ ${TRAVIS_BRANCH} = "master" ]; then diff --git a/package.json b/package.json index a1e36457..dd55ec56 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "scripts": { "start": "node scripts/start.js", "build": "node scripts/build.js", - "test": "run-with-testrpc -l 40000000 --noVMErrorsOnRPCResponse true 'node scripts/test.js --env=jsdom'", + "test": "NODE_ENV=test && node scripts/test.js --env=jsdom", "test-local": "NODE_ENV=test && node scripts/test.js --env=jsdom", "precommit": "./precommit.sh", "flow": "flow",