forked from PHPCompatibility/PHPCompatibility
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
73 lines (59 loc) · 2.8 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
sudo: false
language: php
matrix:
fast_finish: true
include:
- php: 5.2
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION="1.5.6"
- php: 5.2
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION="master"
- php: 5.3
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 5.3
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 5.4
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 5.4
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 5.5
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 5.5
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 5.5
env: COVERALLS_VERSION="dev-master" PHPCS_VERSION="dev-master"
- php: 5.6
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 5.6
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 5.6
env: COVERALLS_VERSION="dev-master" PHPCS_VERSION="dev-master"
- php: 7.0
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 7.0
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 7.0
env: COVERALLS_VERSION="dev-master" PHPCS_VERSION="dev-master"
- php: 7.1
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=1.5.1,<2.0"
- php: 7.1
env: COVERALLS_VERSION="~1.0" PHPCS_VERSION=">=2.0"
- php: 7.1
env: COVERALLS_VERSION="dev-master" PHPCS_VERSION="dev-master"
before_script:
- phpenv rehash
install:
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer self-update; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer require --dev satooshi/php-coveralls:${COVERALLS_VERSION}; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer require squizlabs/php_codesniffer:${PHPCS_VERSION}; fi
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then composer install; fi
- if [[ $TRAVIS_PHP_VERSION < "5.3" ]]; then export PHPCS_DIR=/tmp/phpcs; fi
- if [[ $TRAVIS_PHP_VERSION < "5.3" ]]; then export PHPCS_BIN=$(if [[ $PHPCS_VERSION == 3.0 ]]; then echo $PHPCS_DIR/bin/phpcs; else echo $PHPCS_DIR/scripts/phpcs; fi); fi
- if [[ $TRAVIS_PHP_VERSION < "5.3" ]]; then mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b $PHPCS_VERSION $PHPCS_DIR; fi
- if [[ $TRAVIS_PHP_VERSION < "5.3" ]]; then $PHPCS_BIN --config-set installed_paths $(pwd); fi
script:
- if [[ $TRAVIS_PHP_VERSION > "5.2" ]]; then ln -s `pwd` vendor/squizlabs/php_codesniffer/CodeSniffer/Standards/PHPCompatibility; fi
- mkdir -p build/logs
- find -L . -path ./Tests/sniff-examples -prune -o -path ./vendor -prune -o -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l
- phpunit --configuration phpunit-travis.xml --coverage-clover build/logs/clover.xml
after_script:
- php vendor/bin/coveralls -v -x build/logs/clover.xml