forked from Automattic/sensei
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
111 lines (111 loc) · 2.77 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
sudo: false
dist: trusty
language: php
notifications:
email:
on_success: never
on_failure: never
slack:
rooms:
- secure: DOpF7wER9onzQOw2nAU0jgsmfHmS7UhbMnvvzcMYD+wzWTVT6ccTG9yc93jzUZFlUeVTuDAMa/ws04qwc/an4bIU5Baxg+Hajj9iMMO3Rwft4jgGEgqUgSGmxYt/QYyv5ujV/3H2Yb/SLqa9d9ryGob3Kh263WG6/7jTuIzz5T8=
on_success: change
on_failure: always
branches:
only:
- master
cache:
directories:
- vendor
- "$HOME/.composer/cache"
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 tests/bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
composer global require "phpunit/phpunit=4.8.*|5.7.*"
fi
jobs:
include:
# There are no JS blocks to test yet. Uncomment below when we start adding
# blocks.
#- stage: test
# script:
# - npm install || exit 1
# - npm run test-js || exit 1
- stage: test
php: 7.4
env: WP_VERSION=latest
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 7.1
env: WP_VERSION=latest
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 7.0
env: WP_VERSION=latest
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 5.6
env: WP_VERSION=4.9
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 5.6
env: WP_VERSION=latest
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 5.6
env: WP_VERSION=trunk
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
php: 5.6
env: WP_VERSION=latest WP_MULTISITE=1
script:
- ./tests/bin/run-wp-unit-tests.sh
- stage: test
language: node_js
node_js: '10.17'
script:
- npm run test-js
- stage: test
language: node_js
node_js: '10.17'
script:
- npm run lint-js
- stage: test
language: node_js
node_js: '10.17'
script:
- npm run lint-js-wpcom
- stage: test
php: 7.2
script:
- composer install
- ./vendor/bin/phpcs -s
--sniffs=WordPress.WP.I18n,Generic.PHP.Syntax,WordPress.Security.EscapeOutput .
- stage: test
php: 7.2
script:
- composer install
- ./vendor/bin/phpcs -sn --sniffs=WordPress.Security.NonceVerification .
- stage: test
php: 7.2
script:
- composer install
- ./vendor/bin/phpcs -sn --standard=./wpcom-phpcs.xml .
- stage: test
php: 7.2
script:
- composer install
- ./scripts/linter-ci