Skip to content

Commit d043103

Browse files
committed
improve Travis CI configuration
* fix the Composer cache directory * run jobs with different Symfony versions only on PHP 5.6 * drop jobs for Symfony versions that reached EOL * add job for PHP 7 * run code coverage reports only on PHP 7 * disable Xdebug when code coverage reports won't be generated * finish as soon as possible (when either a mandatory job failed or only jobs that are allowed to fail are running)
1 parent f1febb6 commit d043103

1 file changed

Lines changed: 21 additions & 12 deletions

File tree

.travis.yml

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,41 @@ sudo: false
44

55
cache:
66
directories:
7-
- $HOME/.composer/cache
7+
- $HOME/.composer/cache/files
88

99
php:
1010
- 5.4
1111
- 5.5
12-
- 5.6
1312
- hhvm
1413

1514
matrix:
15+
fast_finish: true
16+
include:
17+
- php: 5.6
18+
env: SYMFONY_VERSION=2.3.*
19+
- php: 5.6
20+
env: SYMFONY_VERSION=2.6.*
21+
- php: 5.6
22+
env: SYMFONY_VERSION=2.7.*
23+
- php: 5.6
24+
env: SYMFONY_VERSION=2.8.*
25+
- php: 7.0
26+
env: COVERAGE=yes
1627
allow_failures:
1728
- php: hhvm
1829

19-
env:
20-
- SYMFONY_VERSION=2.3.*
21-
- SYMFONY_VERSION=2.4.*
22-
- SYMFONY_VERSION=2.5.*
23-
- SYMFONY_VERSION=2.6.*
24-
25-
install:
30+
before_install:
31+
- if [ "$COVERAGE" != "yes" -a "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpenv config-rm xdebug.ini; fi
2632
- composer self-update
2733
- composer require symfony/framework-bundle:${SYMFONY_VERSION} --no-update
34+
35+
install:
2836
- composer install --prefer-dist
2937

30-
script: phpunit --coverage-text --coverage-clover=coverage.clover
38+
script:
39+
- if [ "$COVERAGE" = "yes" ]; then phpunit --coverage-text --coverage-clover=coverage.clover; else phpunit; fi
3140

3241
after_script:
33-
- wget https://scrutinizer-ci.com/ocular.phar
34-
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
42+
- if [ "$COVERAGE" = "yes" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
43+
- if [ "$COVERAGE" = "yes" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi
3544

0 commit comments

Comments
 (0)