-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
121 lines (113 loc) · 3.55 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
# no javascript tests yet, just linting
- env:
- JAVASCRIPT_LINT=1
script:
- npm install || exit 1
- npm run build || exit 1
- npm run lint || 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=4.5
- php: 5.6
env: WP_VERSION=4.5 WP_MULTISITE=1
- php: nightly
notifications:
slack:
rooms:
secure: "swzvCp/Ufj2evf/ti6fuy7qx+VsLtcwCM91IhyZjTITOxtSQs0eIQOBHVkNqTzbdNvBZaJs5KSgfNdGY+HI0BWz1yVsSWqs9zF9anlyhzqGD9+qor6sU596uY6bMH32bbOXakiHTr7A43bMLGb70T44rp/0AW3TUU/eITLbYNw276qsWuWqm+LqE6q2Vi+h8DYVc9ryG/t+XtPqGyjsIdJgVKd1A9PmswLBiBFym/4hhiBi/Jyb3uat/5wcyQngVAel6JxCFej4Gzt5J2ul0GGMp8ygqL9zlc0KbBz6u+ZNv36QPIZWxA1PJOpRedfR3Ke5SVGzdpkbeSxtYVzclKYX9mh7VXiZHIBgUsxozhVi8XsurpL1HJMHPBFeGsd77dl1CRIqDAobnY0fwVMwy5tMu4rLsmB9ehULo6D2WJE5Zl2VJMfXkISUVrnQbkyOUxQGgOJrPs7EvpzcbF0RKPZpkJVUgmh69s14PIrYzc3g3AT4cUXVlaDlxv1z7hMgpJyvd6XSfqqGGEFJseuyrcSIKxuhb5+/oU8TTvlqAPRgSit0VCQiX2HWYLjZZEttN1JLxFdwLUfp+y8oNyS0K9GWXT1rA0zeZHnpzJtApSgWHA104wsIPERaiAD7y7gY+PxEh6bvprMXeKnYktRxIohAWZPgdRo4VMj3Txioscio="
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}"