Merge pull request #58 from gnosis/feature/dockerize-safe-react

Feature: Dockerize safe react
This commit is contained in:
Adolfo Panizo 2018-08-10 10:23:16 +02:00 committed by GitHub
commit a9df97f30c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 28 additions and 2 deletions

View File

@ -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

View File

@ -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",