-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.travis.yml
executable file
·68 lines (53 loc) · 1.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
sudo: false
language: php
git:
depth: 1
notifications:
email: false
matrix:
# - Lint PHP once per PHP version.
#
# - Run `phpunit` for each version of PHP and WordPress in single- and multisite.
#
# - Run `qunit:recent` once. The `recent` task handles running tests against
# different versions of WordPress. If we switch to WP_VERSION=x.y.z we could
# instead run `qunit:specific --wp=$WP_VERSION` so that control over which
# versions are tested stays in this config.
include:
- php: 5.3
env: WP_VERSION=latest PHP_LINT=1
dist: precise
- php: 5.6
env: WP_VERSION=latest PHP_LINT=1
- php: 7.0
env: WP_VERSION=trunk QUNIT_RECENT=1
- php: 7.0
env: WP_VERSION=latest PHP_LINT=1
- php: 7.1
env: WP_VERSION=latest PHP_LINT=1
before_script:
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- export WP_CORE_DIR=/tmp/wordpress
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
else
composer global require "phpunit/phpunit=4.8.*"
fi
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- git clone --depth=1 https://github.com/alleyinteractive/wordpress-fieldmanager $WP_CORE_DIR/wp-content/plugins/wordpress-fieldmanager
- |
if [[ "$QUNIT_RECENT" == "1" ]]; then
npm install
fi
script:
- |
if [[ "$PHP_LINT" == "1" ]]; then
find . -type "f" -iname "*.php" | xargs -L "1" php -l
fi
- |
if [[ "$QUNIT_RECENT" == "1" ]]; then
grunt qunit:recent
fi
- export WP_MULTISITE=0 && phpunit
- export WP_MULTISITE=1 && phpunit