-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
31 lines (28 loc) · 1.13 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
language: php
matrix:
include:
- php: '5.6'
- php: '7.0'
- php: '7.1'
- php: '7.2'
- php: '7.3'
- php: '7.4'
- php: '8.0'
before_install:
- export PHPCS_DIR=/tmp/phpcs
- export SNIFFS_DIR=/tmp/sniffs
# Install PHP_CodeSniffer.
- git clone -b master --depth 1 https://github.com/squizlabs/PHP_CodeSniffer.git $PHPCS_DIR
# Install WordPress Coding Standards.
- git clone -b master --depth 1 https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards.git $SNIFFS_DIR
# Set install path for WordPress Coding Standards.
- $PHPCS_DIR/bin/phpcs --config-set installed_paths $SNIFFS_DIR
# After CodeSniffer install you should refresh your path.
- phpenv rehash
script:
# Run against WordPress Coding Standards.
# If you use a custom ruleset, change `--standard=WordPress` to point to your ruleset file,
# for example: `--standard=wpcs.xml`.
# You can use any of the normal PHPCS command line arguments in the command:
# https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage
- $PHPCS_DIR/bin/phpcs -ps . --standard=WordPress --extensions=php --runtime-set ignore_warnings_on_exit 1