forked from squizlabs/PHP_CodeSniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
33 lines (29 loc) · 1.13 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
sudo: false
language: php
dist: trusty
matrix:
fast_finish: true
include:
- php: 5.4
- php: 5.5
- php: 5.6
- php: 7.0
- php: 7.0
env: CUSTOM_INI=1
- php: 7.1
- php: nightly
- php: hhvm
allow_failures:
- php: nightly
- php: hhvm
before_script:
- if [[ $CUSTOM_INI == "1" && ${TRAVIS_PHP_VERSION:0:1} == "5" ]]; then phpenv config-add php5-testingConfig.ini; fi
- if [[ $CUSTOM_INI == "1" ]] && [[ ${TRAVIS_PHP_VERSION:0:1} == "7" || $TRAVIS_PHP_VERSION == "nightly" ]]; then phpenv config-add php7-testingConfig.ini; fi
script:
- composer install
- if [[ $TRAVIS_PHP_VERSION != hhv* ]]; then php bin/phpcs --config-set php_path php; fi
- vendor/bin/phpunit tests/AllTests.php
- if [[ $CUSTOM_INI != "1" ]]; then php bin/phpcs --no-cache --parallel=1; fi
- if [[ $CUSTOM_INI != "1" && $TRAVIS_PHP_VERSION != hhv* && $TRAVIS_PHP_VERSION != "nightly" ]]; then pear package-validate package.xml; fi
- if [[ $CUSTOM_INI != "1" && $TRAVIS_PHP_VERSION != hhv* ]]; then php scripts/build-phar.php; fi
- if [[ $CUSTOM_INI != "1" && $TRAVIS_PHP_VERSION != hhv* ]]; then php phpcs.phar; fi