-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
36 lines (32 loc) · 1.3 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
language:
- php
php:
- 5.4
- 5.5
env:
- WP_VERSION=4.0 WP_MULTISITE=0
- WP_VERSION=4.0 WP_MULTISITE=1
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
before_script:
- export PLUGIN_DIR=$(pwd)
- export PLUGIN_SLUG=$(basename $(pwd) | sed 's/^wp-//')
- pear config-set auto_discover 1
- pear install PHP_CodeSniffer
- cd $(pear config-get php_dir)/PHP/CodeSniffer/Standards/
- git clone git://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git
- cd WordPress-Coding-Standards/
- git checkout -b master origin/master
- cd $(pear config-get php_dir)/PHP/CodeSniffer/Standards/
- ln -s WordPress-Coding-Standards/WordPress WordPress
- ln -s WordPress-Coding-Standards/WordPress-Core WordPress-Core
- ln -s WordPress-Coding-Standards/WordPress-Extra WordPress-Extra
- ln -s WordPress-Coding-Standards/WordPress-VIP WordPress-VIP
- cd $PLUGIN_DIR
- phpenv rehash
- npm install -g jshint
- if [ -e phpunit.xml ] || [ -e phpunit.xml.dist ]; then bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION; fi
script:
- if [ -e phpunit.xml ] || [ -e phpunit.xml.dist ]; then phpunit; fi
- phpcs --ignore='tests/*' --standard=WordPress-Core $(find . -name '*.php')
- jshint .