-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
45 lines (38 loc) · 915 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
os: linux
dist: xenial
language: php
services:
- mysql
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- master
cache:
- composer
- $HOME/.composer/cache
jobs:
include:
- php: 7.4
env: WP_VERSION=latest WP_TRAVISCI=phpcs
- php: 7.3
env: WP_VERSION=latest
install:
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
fi
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
composer global require "squizlabs/php_codesniffer=*"
composer global require dealerdirect/phpcodesniffer-composer-installer
composer global require wp-coding-standards/wpcs
fi
script:
- |
if [[ "$WP_TRAVISCI" == "phpcs" ]] ; then
phpcs --standard=phpcs.ruleset.xml $(find . -name '*.php')
fi