Skip to content

Commit 1d2807b

Browse files
committed
👷 Travis
1 parent 32742ed commit 1d2807b

File tree

4 files changed

+7
-22
lines changed

4 files changed

+7
-22
lines changed

.travis.yml

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,12 @@ services:
99
- docker
1010

1111
install:
12-
# Update docker-engine using Ubuntu 'trusty' apt repo
13-
- >
14-
curl -sSL "https://get.docker.com/gpg" |
15-
sudo -E apt-key add -
16-
- >
17-
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
18-
sudo tee -a /etc/apt/sources.list
19-
- sudo apt-get update
20-
- >
21-
sudo apt-get -o Dpkg::Options::="--force-confdef" \
22-
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine --allow-unauthenticated
2312
- docker version
24-
25-
# Update docker-compose via pip
2613
- sudo pip install docker-compose
2714
- docker-compose version
28-
- docker-compose up --build -d
29-
- docker ps -a
15+
- sed -i -e "s/php:cli/php:${TRAVIS_PHP_VERSION}-cli/g" Dockerfile
16+
- cat Dockerfile
17+
- docker-compose build
3018

3119
script:
3220
- docker-compose up --exit-code-from php

docker/Dockerfile renamed to Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.1-cli
1+
FROM php:cli
22

33
RUN pecl install xdebug
44

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

14-
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"
14+
ENV PATH="~/.composer/vendor/bin:./vendor/bin:${PATH}"

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ services:
66
container_name: php
77
build:
88
context: .
9-
dockerfile: docker/Dockerfile
9+
dockerfile: Dockerfile
1010
volumes:
1111
- .:/code
1212
working_dir: /code
13-
command: docker/entrypoint.sh
13+
command: bash -c "composer install --prefer-source --no-interaction && php ./vendor/bin/phpunit"
1414
depends_on:
1515
- mysql
1616
- mongodb

docker/entrypoint.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)