forked from eventespresso/event-espresso-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
157 lines (149 loc) · 4.63 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
sudo: required
language: php
services:
- mysql
cache:
apt: true
directories:
- $HOME/.composer/cache
- $HOME/.npm
env:
global:
- WP_VERSION=latest WP_MULTISITE=0
before_install:
- |
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
- 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.3|nightly)
# when wp tests support phpunit 7 we'll update this.
echo "Using PHPUnit 6"
composer global require "phpunit/phpunit=6.5.*"
;;
7.2|7.1|7.0)
echo "Using PHPUnit 6"
composer global require "phpunit/phpunit=6.5.*"
;;
5.6|5.5)
echo "Using PHPUnit 4.8"
composer global require "phpunit/phpunit=4.8.*"
;;
*)
echo "No PHPUnit version handling for PHP version $TRAVIS_PHP_VERSION"
exit 1
;;
esac
fi
- mysql --version
- phpunit --version
- phpenv versions
- npm --version
- node --version
script: npm run test-php
jobs:
fast_finish: true
allow_failures:
- php: nightly
- php: 7.3
env:
- PHP_LINT=1
- PHP_LINT_WITH_WARNINGS=yes
include:
- stage: test
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
php: 7.3
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.3
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
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
- env:
- JAVASCRIPT_TESTS=1
language: node_js
node_js:
- node
before_install:
- nvm install && nvm use
- nvm install --latest-npm
before_script:
- npm --version
- node --version
script:
- npm run ci:test || exit 1
- language: node_js
env:
- LICENSE_CHECK=1
before_script:
- npm --version
- node --version
script:
- npm run lc || exit 1
- language: node_js
env:
- BUILD_TEST=1
before_install:
- nvm install && nvm use
- nvm install --latest-npm
before_script:
- npm --version
- node --version
script:
- npm run ci:build || exit 1
- language: node_js
env:
- JS_LINT=1
before_script:
- npm --version
- node --version
script:
- npm run ci:lint || exit 1
- php: 7.3
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- php: 7.2
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- php: 7.1
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- php: 7.0
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- php: 5.6
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
# multisite
- php: 7.2
env: WP_MULTISITE=1
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
# wp 4.5 builds
- php: 5.5
env: WP_VERSION=4.5
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
- php: nightly
if: NOT commit_message =~ js_only AND NOT commit_message =~ dependabot AND NOT sender =~ dependabot
notifications:
slack:
rooms:
secure: e2xmbwOoagh/rZIqUnx15HcTv5hZGxykvg8Tj0ENGi/bLcXgrEYxs2hpW+nzGggmSl22Eh+6wLRo62L0dEIIo1n+yknqDdAbVG7lmnX7Tc45JNgxWtSmAPzC3wAp0e9w1hy8HILPjYLxl0G7eXUvo3mKVRCCyD/Cyz5dDicE8tQ=
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}"