-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
121 lines (112 loc) · 3.54 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
sudo: required
language: php
services:
- mysql
cache:
apt: true
directories:
- $HOME/.composer/cache
- $HOME/.npm
env:
global:
- EE_VERSION=master
- WP_VERSION=latest WP_MULTISITE=0
before_install:
- nvm install && nvm use
- |
if [[ "$SKIP_XDEBUG_REMOVE" != "true" ]]; then
cp $HOME/.phpenv/versions/$(phpenv global)/etc/conf.d/xdebug.ini /tmp
phpenv config-rm xdebug.ini
echo "xdebug removed";
fi
before_script:
- bash tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- . tests/bin/setup-addon-tests.sh
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
# Install the specified version of PHPUnit depending on the PHP version:
if [[ -n "$TRAVIS_PHP_VERSION" ]]; then
case "$TRAVIS_PHP_VERSION" in
7.2|7.1|7.0|nightly)
echo "Using PHPUnit 6.1"
composer global require "phpunit/phpunit=6.1.*"
;;
5.6|5.5|5.4|5.3)
echo "Using PHPUnit 4.8"
composer global require "phpunit/phpunit=4.8.*"
;;
5.2)
# Do nothing, use default PHPUnit 3.6.x
echo "Using default PHPUnit, hopefully 3.6"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1
;;
esac
fi
- mysql --version
- phpunit --version
- phpenv versions
script: npm run test-php
jobs:
fast_finish: true
allow_failures:
- php: nightly
- php: 7.2
env:
- PHP_LINT=1
- PHP_LINT_WITH_WARNINGS=yes
include:
- stage: test
php: 7.2
env:
- PHP_LINT=1
- PHP_LINT_WITH_WARNINGS=no
script:
- composer install || exit 1
- composer config-eventespressocs || exit 1
- npm run lint-php:skip-warnings || exit 1
- php: 7.2
env:
- PHP_LINT=1
- PHP_LINT_WITH_WARNINGS=yes
script:
- composer install || exit 1
- composer config-eventespressocs || exit 1
- npm run lint-php || exit 1
## skipping for now because there's no javascript to test!
# - env:
# - JAVASCRIPT_TESTS=1
# script:
# - npm install || exit 1
# - npm run ci || exit 1
- php: 7.2
- php: 7.1
- php: 7.0
- php: 5.6
# multisite
- php: 7.2
env: WP_MULTISITE=1
- php: 7.1
env: WP_MULTISITE=1
- php: 7.0
env: WP_MULTISITE=1
- php: 5.6
env: WP_MULTISITE=1
# wp 4.5 builds
- php: 5.6
env: WP_VERSION=5.2
- php: 5.6
env: WP_VERSION=5.2 WP_MULTISITE=1
- php: nightly
notifications:
slack:
rooms:
secure: "Rl7Bg/uhW67eflotc4O8TXaICIK0OOKrR61nCW9G9er6sDRHB4xY94oj7UWqmxemaEEus3nvrrr9jxzDB1oOML1YJ0r85zHY8kE3aelza158Lo+uZ6ZBZfTlK0tnDHFH3tSvXTU+pn5iRzHcNi3TfK6wJW+QpH776ljQ70Jw/Xx89orwbvrT05KJ2GCzhquLcW8ndvUic7U04S8ew7kafULE8zfL7BbFFfvPMMlwPB3/VF8Y1vL5LHlVGLaLSuOBKdM6fQYu7lCsXia47FWvUWqEB4EuaWEFrvFJ8UsjOw61cUWH8++Ukhzv0oHFxrA2DiZ3O/01SfzxAXabzMFSPpgxSJhShNvM6WGKgi9H27oSZ/hA1V3QBzyQ0h3VCFRhfDXpk/q2Aq5zubRi/ZivIAwStcYmMJ1SLhCUqGKVrJfG2OR33KXroVm+cxX4XVMpyJ7L1ufIbq49oyeCO5zI2GFVBaHf0Jo2/MNncx86iSUkQWkLxpqudxixV8MrKBCHgKrETQx65htQSmpoRc9S1iHPwg2hBaCWuxSTmRuF/ZZHtC4Avj4D/thuORFfl4B/wCHqj2pk8I3C3YlfGfi6g151ioDIbHJ0uGnkvKM7jL2WgCKEEf40i/IgRyIOhJAbZbYxTeovzUuCs1XHB98tbaIELZCBWTh7wFP35HLISpg="
on_success: change
on_failure: always
on_start: always
template:
- "Build <%{build_url}|#%{build_number}> (<%{compare_url}|%{commit}>) of %{repository}@%{branch} by %{author} %{result} in %{duration}"
- "%{commit_message}"