This repository has been archived by the owner on May 20, 2019. It is now read-only.
forked from dvdoug/BoxPacker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
34 lines (28 loc) · 1.7 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
language: php
sudo: false
matrix:
include:
# Use the newer stack for HHVM as HHVM does not support Precise anymore
- php: hhvm-nightly
sudo: required
dist: trusty
group: edge
- php: 5.4
env: lowest=1
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.1.0
cache:
directories:
- $HOME/.cache/composer/files
install:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ]; then phpenv config-rm xdebug.ini; fi;' # Xdebug makes tests *really* slow
- if [ "$lowest" = "1" ]; then composer update --prefer-lowest --prefer-stable; else composer install; fi;
before_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then echo "memory_limit = 3072M" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;' # phpdbg is RAM hungry
script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ "$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; fi;'
after_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm-nightly" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ] && [ "$TRAVIS_PHP_VERSION" != "5.6" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'