-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
39 lines (33 loc) · 987 Bytes
/
.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
sudo: false
language:
- php
php:
- 5.3
- 5.4
- 5.5
- 5.6
env:
- PHPCS_BRANCH=master
- PHPCS_BRANCH=2.2.0
matrix:
include:
- php: 5.6
env: PHPCS_BRANCH=3.0
# Run against HHVM and PHP nightly.
- php: hhvm
env: PHPCS_BRANCH=master
- php: nightly
env: PHPCS_BRANCH=master
allow_failures:
# Allow failures for unstable builds.
- php: nightly
- php: hhvm
- env: PHPCS_BRANCH=3.0
before_script:
- export PHPCS_DIR=/tmp/phpcs
- export PHPCS_BIN=$(if [[ $PHPCS_BRANCH == 3.0 ]]; then echo $PHPCS_DIR/bin/phpcs; else echo $PHPCS_DIR/scripts/phpcs; fi)
- mkdir -p $PHPCS_DIR && git clone --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git -b $PHPCS_BRANCH $PHPCS_DIR
- $PHPCS_BIN --config-set installed_paths $(pwd)
script:
- if find . -name "*.php" -exec php -l {} \; | grep "^[Parse error|Fatal error]"; then exit 1; fi;
- phpunit --filter WordPress /tmp/phpcs/tests/AllTests.php