Skip to content

Commit

Permalink
Try running HHVM through docker
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdoug committed Aug 13, 2017
1 parent 8082bd4 commit 9626872
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .travis.yml
Expand Up @@ -4,6 +4,9 @@ sudo: false
matrix:
include:
- php: hhvm
sudo: required
services:
- docker
- php: 5.4
env: lowest=1
- php: 5.5
Expand All @@ -18,12 +21,20 @@ cache:

install:
- |
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then
if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then
docker pull hhvm/hhvm:latest;
docker run --rm hhvm/hhvm:latest hhvm --version;
sudo apt-get install -y wget curl git;
curl https://getcomposer.org/installer | hhvm --php -- /dev/stdin --install-dir=/usr/local/bin --filename=composer;
docker run --rm hhvm/hhvm:latest /usr/local/bin/composer --working-dir /var/source
else
phpenv config-rm xdebug.ini || true;
fi;
- |
if [ "$lowest" = "1" ]; then
if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then
docker run --rm hhvm/hhvm:latest /usr/local/bin/composer --working-dir /var/source install;
elif [ "$lowest" = "1" ]; then
composer update --prefer-lowest --prefer-stable;
else
composer install;
Expand All @@ -37,7 +48,9 @@ before_script:
script:
- |
if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then
if [ "$TRAVIS_PHP_VERSION" = "hhvm" ]; then
docker run -v $(pwd):/var/source hhvm/hhvm:latest hhvm /var/source/vendor/bin/phpunit /var/source/tests;
elif [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then
phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests;
else
php vendor/bin/phpunit;
Expand Down

0 comments on commit 9626872

Please sign in to comment.