-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
51 lines (43 loc) · 1.03 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
language: php
sudo: false
dist: trusty
cache:
directories:
- node_modules
- vendor
- $HOME/.composer/cache
env:
global:
- WP_VERSION=latest WP_MULTISITE=0
- WP_TRAVISCI="travis:phpunit"
matrix:
include:
- php: 5.6
- php: 7.0
- php: 7.1
- php: 7.2
before_install:
- travis_retry composer self-update
install:
- composer install --prefer-source --no-interaction --dev
- composer global require "phpunit/phpunit=4.8.*|5.7.*"
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
phpenv config-rm xdebug.ini
else
echo "xdebug.ini does not exist"
fi
- |
if [[ ! -z "$WP_VERSION" ]] ; then
bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
script:
- composer phpcs
- composer test-unit
- composer test-integration
notifications:
on_success: never
on_failure: always