Skip to content

Commit

Permalink
travis with ubuntu 16.04
Browse files Browse the repository at this point in the history
  • Loading branch information
khs1994 committed Oct 25, 2018
1 parent d0ac1e6 commit adde5bc
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

language: php

os: linux
dist: xenial

cache:
directories:
- cache
Expand Down Expand Up @@ -52,9 +55,16 @@ before_install:
- sh -c "if [ '$DB' = 'postgres' ]; then psql -c 'CREATE DATABASE tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS tests_tmp; CREATE DATABASE IF NOT EXISTS tests;'; fi"
- sh -c "if [ '$ENABLE_MONGODB' = 'enable' ]; then mongo mydb_test --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'; fi"
# ubuntu 14.04
# https://docs.docker.com/edge/engine/reference/commandline/dockerd/#daemon-socket-option
- echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"' | sudo tee /etc/default/docker
- sudo service docker restart
# - echo 'DOCKER_OPTS="-H unix:///var/run/docker.sock -H tcp://0.0.0.0:2375"' | sudo tee /etc/default/docker
# - sudo service docker restart
# ubuntu 16.04
- sudo mkdir -p /etc/systemd/system/docker.service.d
- echo -e '[Service]\nExecStart=\nExecStart=/usr/bin/dockerd' | sudo tee /etc/systemd/system/docker.service.d/docker.conf
- echo '{"hosts":["unix:///var/run/docker.sock","tcp://0.0.0.0:2375"]}' | sudo tee /etc/docker/daemon.json
- sudo systemctl cat docker
- sudo systemctl restart docker
- sudo curl -fsSL http://get.sensiolabs.org/sami.phar -o /usr/local/bin/sami
- sudo chmod +x /usr/local/bin/sami

Expand Down
2 changes: 1 addition & 1 deletion tests/Docker/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use Docker\Docker;

class TestCase extends \PHPUnit\Framework\TestCase
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
const DOCKER_HOST = '127.0.0.1:2375';

Expand Down

0 comments on commit adde5bc

Please sign in to comment.