-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
72 lines (71 loc) · 2.65 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
sudo: false
dist: trusty
language: php
notifications:
email:
on_success: never
on_failure: change
slack:
secure: LkHFLwJAqenVshavb3bcG+DfbKuiMYWIgAbsKmypz1Ie7CmNWCGJJroveZjNrm835BdviBK0Ci/gbXXpq5NVy8m3QWBcxCr0bbwMJ5pIZ1tHMqepxy3TrxYRiWvg7aPZBwwmYLBNSaZelLT2Bx0OQlSeopdWQcnG0cBf52UDmY3daCidNdmLrv7Mdt2bzS4dQKe7FZNB1YTXPtoZCpWeiqLoLdbvQ7dIQuOZhoroDVoiH3NQZqOjJmouRba8dfrsVDzf24t7K43xOLp1lEC8Eg/aLJdePcI8+fbsAXwqjuKqVuD3IkxyoAwxKB2lWUOQ0tiDgy4/j2gd035JYFQPUpYhaiW9YWHfchTyG5X6Kr9BKVSmIDXwJfy1n7EwmgRxGSTupSAH6VDZNdTNkHkeceahSCmgncBoh3va8xz1jTYHNVu96At91Lm9qUh0mjApz66TAml+JaX0j/0m7yWqEAil1WQggbKgBVJ9ofcnSx1wEzBsqPHKnFnYtjVBm6gXqtDDzYAnmRNwB72mb0iOY5z5bFmQidxwotFLurvLQZmRZnKOsuGqbWNkvpmt+0EIJdM+1hi4COyVvEIRy6YlbxilJDGRKvtsF+g6xh4cVyRi+3pnvnOGWJPCeeuX9ydYaIV4PyPkO23T4rRNJz6t9Y1fEfNDiYa3Um0FkEKTlfw=
branches:
only:
- master
cache:
directories:
- "$HOME/.composer/cache"
matrix:
include:
- php: 7.2
env: WP_VERSION=latest
- php: 7.2
env: SNIFF=1
- php: 7.1
env: WP_VERSION=latest
- php: 7.0
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=4.5
- php: 5.6
env: WP_VERSION=latest
- php: 5.6
env: WP_VERSION=trunk
- php: 5.6
env: SNIFF=1
- php: 5.3
env: WP_VERSION=latest
dist: precise
before_install:
- |
if [[ "$SNIFF" == "1" ]]; then
export PHPCS_DIR=/tmp/phpcs;
export SNIFFS_DIR=/tmp/sniffs;
git clone -b master --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR;
git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $SNIFFS_DIR/wpcs/;
git clone -b master --depth 1 https://github.com/wimg/PHPCompatibility.git $SNIFFS_DIR/PHPCompatibility/;
git clone -b master --depth 1 https://github.com/PHPCompatibility/PHPCompatibilityWP.git $SNIFFS_DIR/PHPCompatibilityWP/;
$PHPCS_DIR/bin/phpcs --config-set installed_paths $SNIFFS_DIR/wpcs/WordPress-Core/,$SNIFFS_DIR/wpcs/WordPress-Docs/,$SNIFFS_DIR/wpcs/WordPress-Extra/,$SNIFFS_DIR/PHPCompatibility/,$SNIFFS_DIR/PHPCompatibilityWP/;
phpenv rehash;
fi
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 [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
script:
- |
if [[ ! -z "$WP_VERSION" ]] ; then
phpunit .
WP_MULTISITE=1 phpunit .
fi
- |
if [[ "$SNIFF" == "1" ]] ; then
$PHPCS_DIR/bin/phpcs -p . --standard=phpcs.xml
fi