forked from wpmetabox/meta-box
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (47 loc) · 1.64 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
language: php
# Ditch sudo and use containers.
# http://docs.travis-ci.com/user/migrating-from-legacy/
sudo: false
php:
- hhvm
- 7.0
- 5.6
- 5.5
- 5.4
- 5.3
- 5.2
env:
- WP_VERSION=master
- WP_VERSION=4.4
- WP_VERSION=4.3
matrix:
allow_failures:
- php: 7.0
- php: hhvm
fast_finish: true
before_script:
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
- git clone -q --depth=1 --branch="$WP_VERSION" git://develop.git.wordpress.org/ $WP_DEVELOP_DIR
- PLUGIN_SLUG=$(basename $(pwd))
- PLUGIN_DIR=$WP_DEVELOP_DIR/src/wp-content/plugins/$PLUGIN_SLUG
- cd ..
- mv $PLUGIN_SLUG $PLUGIN_DIR
- cd $WP_DEVELOP_DIR
- cp wp-tests-config-sample.php wp-tests-config.php
- sed -i "s/youremptytestdbnamehere/wordpress_test/" wp-tests-config.php
- sed -i "s/yourusernamehere/root/" wp-tests-config.php
- sed -i "s/yourpasswordhere//" wp-tests-config.php
- mysql -e 'CREATE DATABASE wordpress_test;' -uroot
- git clone -q https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer
- git clone -q https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards
- cd php-codesniffer
- scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
- cd $PLUGIN_DIR
- phpenv rehash
script:
- $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -s -n . --standard=./codesniffer.ruleset.xml --extensions=php --ignore=demo,tests
notifications:
email: false
slack:
secure: E8/2FJroC8dNUfStwCSYtQjJnF0yS91H/lAiviMzegQkail9xPTa3FbtI40NTvuLw20NwQAg9ijRWmYQOMyjpF2xkUBet5MAX7BbZfAIIj23SnRhe1ct4sNbfIwLpPTwC/jWLcJDPL+82KbuobgxHevUdgY8SdLOv1fT7gIJmhs=