-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
45 lines (37 loc) · 1.34 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
35
36
37
38
39
40
41
42
43
44
45
language: php
php:
- 5.5
- 5.6
- 7.0
sudo: false
matrix:
include:
- php: 5.5
env: |
COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
COVERAGE="--coverage-clover=coverage.xml"
- php: 5.6
env: SYMFONY_VERSION="2.7.*"
- php: 5.6
env: SYMFONY_VERSION="2.8.*"
- php: 5.6
env: SYMFONY_VERSION="3.0.*"
- php: 7.0
install:
- if [ "${COVERAGE}" = "" ]; then phpenv config-rm xdebug.ini; fi;
- if [ ! -f "$(php-config --extension-dir)/amqp.so" ] && [ "${TRAVIS_PHP_VERSION}" = "7.0" ]; then printf "\n" | pecl install amqp-1.7.0alpha2; fi;
- echo "extension = amqp.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- travis_retry wget http://get.sensiolabs.org/php-cs-fixer.phar -O php-cs-fixer.phar
before_script:
- if [ "$SYMFONY_VERSION" != "" ]; then composer require symfony/symfony:${SYMFONY_VERSION} --no-update; fi
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction
script:
- vendor/bin/phpunit ${COVERAGE}
- php php-cs-fixer.phar fix src/ --level=psr2 --dry-run
after_script:
- if [ "${COVERAGE}" != "" ]; then wget https://scrutinizer-ci.com/ocular.phar; fi
- if [ "${COVERAGE}" != "" ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.xml; fi
cache:
directories:
- $HOME/.composer/cache