-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.travis.yml
73 lines (58 loc) · 1.66 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
language: php
php:
- "7.4snapshot"
- "7.3"
- "7.1"
- "7.0"
- "5.6"
- "5.5"
env:
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
# Customize the build matrix.
matrix:
fast_finish: true
include:
# Run PHP_CodeSniffer
- name: Coding standards
php: 7.3
env: WP_VERSION=latest WP_TRAVISCI=phpcs
# Canary for our oldest-supported version
- name: Legacy
php: 5.6
env: WP_VERSION=4.9
# Nightly versions of PHP and WordPress.
- name: Bleeding edge
php: 7.4snapshot
env: WP_VERSION=trunk
# Jobs that are permitted to fail without breaking the build
allow_failures:
- name: Bleeding edge
before_script:
# Unless we need XDebug, disable it for improved performance.
- phpenv config-rm xdebug.ini || return 0
install:
# Install our Composer dependencies
- composer install --prefer-dist --no-interaction
# Install an older version of PHPUnit if we're still running PHP 5.6.
- |
if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then
wget -O ./vendor/bin/phpunit https://phar.phpunit.de/phpunit-5.phar
chmod +x ./vendor/bin/phpunit
fi
# Install the WordPress core test suite
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
script:
- |
# If we've set the $WP_TRAVISCI variable to run PHPCS, do that instead
# of running PHPUnit.
if [[ "$WP_TRAVISCI" == "phpcs" ]]; then
./vendor/bin/phpcs
else
# Execute the test suite
./vendor/bin/phpunit
# Optionally run the tests again in a multisite environment
#WP_MULTISITE=1 ./vendor/bin/phpunit
fi