diff --git a/.travis.yml b/.travis.yml index 79610d2fc0..c47bf3ac76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,13 +12,15 @@ install: - docker-compose build - docker-compose up -d - docker-compose exec web sleep 5 + - docker-compose logs db + - netstat -ltpn - docker-compose exec web bash -c "rake db:setup" - docker-compose exec web bash -c "rake db:migrate" - docker-compose exec web bower install --allow-root - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then gem install danger danger-junit; fi' script: - - docker-compose run -e CI=TRUE web bash -c "GENERATE_REPORT=true rake test:all" + - docker-compose exec web bash -c "CI=TRUE GENERATE_REPORT=true rake test:all" - echo -e '' > output.xml - tail -n +2 -q ./test/reports/TEST*.xml >> output.xml - 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then danger --verbose; fi' diff --git a/config/database.yml.example b/config/database.yml.example index 2d7a22d9b0..9b90287339 100644 --- a/config/database.yml.example +++ b/config/database.yml.example @@ -6,8 +6,8 @@ test: username: plots password: plots database: plots - host: db encoding: utf8 + host: 127.0.0.1 pool: 5 timeout: 5000 strict: false diff --git a/docker-compose.yml b/docker-compose.yml index 095c3fbd11..c0d26e4612 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ version: "2" services: db: image: mariadb:10.2 + network_mode: "service:web" environment: - MYSQL_DATABASE=plots - MYSQL_USER=plots @@ -25,6 +26,4 @@ services: - .:/app ports: - "127.0.0.1:4000:4000" - links: - - db restart: unless-stopped