Skip to content

Commit

Permalink
👷 Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
jenssegers committed Jun 18, 2018
1 parent 32742ed commit 1d2807b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 22 deletions.
18 changes: 3 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,12 @@ services:
- docker

install:
# Update docker-engine using Ubuntu 'trusty' apt repo
- >
curl -sSL "https://get.docker.com/gpg" |
sudo -E apt-key add -
- >
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- >
sudo apt-get -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
- docker version

# Update docker-compose via pip
- sudo pip install docker-compose
- docker-compose version
- docker-compose up --build -d
- docker ps -a
- sed -i -e "s/php:cli/php:${TRAVIS_PHP_VERSION}-cli/g" Dockerfile
- cat Dockerfile
- docker-compose build

script:
- docker-compose up --exit-code-from php
4 changes: 2 additions & 2 deletions docker/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.1-cli
FROM php:cli

RUN pecl install xdebug

Expand All @@ -11,4 +11,4 @@ RUN curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/ \
&& ln -s /usr/local/bin/composer.phar /usr/local/bin/composer

ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ services:
container_name: php
build:
context: .
dockerfile: docker/Dockerfile
dockerfile: Dockerfile
volumes:
- .:/code
working_dir: /code
command: docker/entrypoint.sh
command: bash -c "composer install --prefer-source --no-interaction && php ./vendor/bin/phpunit"
depends_on:
- mysql
- mongodb
Expand Down
3 changes: 0 additions & 3 deletions docker/entrypoint.sh

This file was deleted.

0 comments on commit 1d2807b

Please sign in to comment.