-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
42 lines (34 loc) · 1017 Bytes
/
.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
branches:
only:
- master
language: php
services:
- mysql
env:
global:
- WP_DB_USER=wp
- WP_DB_PASS=password
- WP_DB_NAME=wp_tests
- WP_VERSION=*
php:
- 8.0
- 7.4
- 5.6
matrix:
include:
- php: 5.6
env: WP_VERSION=4.9.*
before_script:
- mysql -u root -e "GRANT ALL PRIVILEGES ON ${WP_DB_NAME}.* TO ${WP_DB_USER} IDENTIFIED BY '${WP_DB_PASS}';"
- mysql -u root -e "CREATE DATABASE ${WP_DB_NAME};"
install:
- composer validate --strict
- composer require --no-update --dev roots/wordpress:${WP_VERSION} wp-phpunit/wp-phpunit:${WP_VERSION}
- "[ $TRAVIS_PHP_VERSION == '8.0' ] || composer install"
# Temporary hack to allow installing PHPUnit 7 with PHP 8 until WP 5.9.
# as WP PHPUnit does not allow PHPUnit higher than 7 yet.
# See https://github.com/WordPress/wordpress-develop/commit/8def694fe4c5df95f8e20e40389faf9cb92b6dca
- "[ $TRAVIS_PHP_VERSION != '8.0' ] || composer install --ignore-platform-reqs"
- composer show
script:
- composer test