-
Notifications
You must be signed in to change notification settings - Fork 106
/
.travis.yml
59 lines (47 loc) · 1.31 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
# Declare project language.
# @link http://about.travis-ci.org/docs/user/languages/php/
language: php
# Declare versions of PHP to use. Use one decimal max.
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- nightly
services:
- mysql
env:
global:
- WP_DEVELOP_DIR=/tmp/wordpress/
matrix:
# Trunk
- WP_VERSION=master WP_MULTISITE=0
- WP_VERSION=master WP_MULTISITE=1
# Latest stable version
- WP_VERSION=stable WP_MULTISITE=0
- WP_VERSION=stable WP_MULTISITE=1
# Prepare the system by installing prerequisites and dependencies.
# Failures in this section will result in build status 'errored'.
before_install:
- nvm install node
- composer self-update
# Prepare your build for testing.
# Failures in this section will result in build status 'errored'.
before_script:
- pwd
# Build plugin
- composer install
- npm install
- npm run build
- npm run package
# set up WP install
- bash tests/install.sh $WP_VERSION wordpress_test root
# Run test script commands
# Default is specific to project language.
# All commands must exit with code 0 on success. Anything else is considered failure.
script:
# Search for PHP syntax errors.
- find . -maxdepth 1 \( -name '*.php' \) -exec php -lf {} \;
- find src/php/ \( -name '*.php' \) -exec php -lf {} \;
# Run tests
- npm run test