-
Notifications
You must be signed in to change notification settings - Fork 89
/
.travis.yml
60 lines (47 loc) · 1.4 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
language: php
dist: bionic
notifications:
email:
on_success: never
on_failure: change
git:
depth: 1
services:
- mysql
php:
- 7.3
- 7.4
- 8.0
env:
global:
- WP_VERSION=latest
matrix:
include:
- php: 8.0
env: WP_MULTISITE=1 CUSTOM_CONSTANTS=0
- php: 8.0
env: WP_MULTISITE=1 CUSTOM_CONSTANTS=1
- dist: focal
php: 8.1
- dist: focal
php: 8.2
env: LIBONIG_INSTALL=1
before_install:
- '[[ "$TRAVIS_PHP_VERSION" != "7.2" ]] || export PHPUNIT_UPGRADE=1'
install:
# for PHP 8.2 install libonig
- if [ -n "$LIBONIG_INSTALL" ]; then sudo apt-get install libonig5; fi
# flags to pass to install
- flags="--ansi --prefer-dist --no-interaction --optimize-autoloader --no-progress"
# Upgrade phpunit for php 7.3 and higher
- if [ -z "$PHPUNIT_UPGRADE" ]; then rm composer.lock; fi
- if [ -z "$PHPUNIT_UPGRADE" ]; then composer config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; fi
- if [ -z "$PHPUNIT_UPGRADE" ]; then composer require --no-interaction --dev phpunit/phpunit:9.3; fi
# install dependencies using system provided composer binary
- composer install $flags
before_script:
# install wp tests infra
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
# print what's installed and where by default
# - which phpunit && phpunit --version
script: ./vendor/bin/phpunit