-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
25 lines (22 loc) · 963 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
language: php
php:
- "5.5"
before_script:
- code_path=$(pwd)
- export WP_DEVELOP_DIR=/tmp/wordpress/
- mkdir -p $WP_DEVELOP_DIR
- cd $WP_DEVELOP_DIR
# Install CodeSniffer for WordPress Coding Standards checks.
- git clone https://github.com/squizlabs/PHP_CodeSniffer.git php-codesniffer
# Install WordPress Coding Standards.
- git clone https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git wordpress-coding-standards
# Hop into CodeSniffer directory.
- cd php-codesniffer
# Set install path for WordPress Coding Standards
# @link https://github.com/squizlabs/PHP_CodeSniffer/blob/4237c2fc98cc838730b76ee9cee316f99286a2a7/CodeSniffer.php#L1941
- scripts/phpcs --config-set installed_paths ../wordpress-coding-standards
# After CodeSniffer install you should refresh your path.
- phpenv rehash
script:
- cd $code_path
- $WP_DEVELOP_DIR/php-codesniffer/scripts/phpcs -p -s -v -n . --standard=./codesniffer.ruleset.xml --extensions=php