forked from phux/BoxPacker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
26 lines (21 loc) · 1.03 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
language: php
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
- hhvm
cache:
directories:
- $HOME/.cache/composer/files
# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
before_script:
- composer install
- sh -c 'if [ "$TRAVIS_PHP_VERSION" = "5.4" ] || [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then phpenv config-rm xdebug.ini; fi;'
script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ]; then vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover tests; else vendor/bin/phpunit; fi;'
after_script:
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi;'
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "5.4" ] && [ "$TRAVIS_PHP_VERSION" != "5.5" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi;'