forked from squizlabs/PHP_CodeSniffer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (35 loc) · 1.56 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
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: 7.2
- php: nightly
- php: hhvm
allow_failures:
- php: nightly
- php: hhvm
before_install:
# Circumvent a bug in the travis HHVM image - ships with incompatible PHPUnit.
- if [[ $TRAVIS_PHP_VERSION == hhv* ]]; then composer self-update; fi
- if [[ $TRAVIS_PHP_VERSION == hhv* ]]; then composer require phpunit/phpunit:~4.0; fi
- if [[ $TRAVIS_PHP_VERSION == hhv* ]]; then composer install; fi
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:
- if [[ $TRAVIS_PHP_VERSION != hhv* ]]; then php bin/phpcs --config-set php_path php; fi
- if [[ $TRAVIS_PHP_VERSION != hhv* ]]; then phpunit tests/AllTests.php; fi
- if [[ $TRAVIS_PHP_VERSION == hhv* ]]; then vendor/bin/phpunit tests/AllTests.php; fi
- 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