-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (35 loc) · 916 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
40
41
sudo: false
dist: trusty
language: php
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 7.2
env: WP_TRAVISCI=phpcs
- php: 7.1
env: WP_TRAVISCI=phpcs
- php: 7.0
env: WP_TRAVISCI=phpcs
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer install;
fi
script:
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
find . -name '*.php' ! -path "./vendor/*" ! -path "./wp-content/*" -print0 | xargs -0 -n 1 -P 4 php -l
echo Running phpcs for PHP version $TRAVIS_PHP_VERSION …
./vendor/bin/phpcs --runtime-set testVersion $TRAVIS_PHP_VERSION
fi
notifications:
email: false