forked from Automattic/WP-Job-Manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (60 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
69
# Travis CI Configuration File
# Tell Travis CI we're using PHP
language: php
# Tell Travis CI which distro to use
dist: trusty
# Setup a global environemnt and overide as needed
env:
global:
- WP_TRAVISCI=phpunit
cache:
directories:
- $HOME/.composer/cache/files
- $HOME/.npm
branches:
only:
- master
# Next we define our matrix of additional build configurations to test against.
matrix:
include:
# Uncomment this once there are JavaScript tests.
# - env: WP_TRAVISCI="npm test"
- php: "7.2"
env: WP_TRAVISCI="phpcs"
- php: "5.2"
dist: precise
env: WP_VERSION=latest
- php: "5.6"
env: WP_VERSION=latest
- php: "5.6"
env: WP_VERSION=master
- php: "5.6"
env: WP_VERSION=previous
- php: "7.0"
env: WP_VERSION=latest
- php: "7.1"
env: WP_VERSION=latest
- php: "7.2"
env: WP_VERSION=latest
# Clones WordPress and configures our testing environment.
before_script:
- phpenv config-rm xdebug.ini
- export PLUGIN_BASE_DIR=$(basename $(pwd))
- export PLUGIN_SLUG=$(basename $(pwd) | tr '[:upper:]' '[:lower:]')
- source ~/.nvm/nvm.sh
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:2} == "7." ]]; then
composer global require "phpunit/phpunit=5.7.*"
elif [[ ${TRAVIS_PHP_VERSION:0:3} != "5.2" ]]; then
composer global require "phpunit/phpunit=4.8.*"
fi
- nvm install 8
- nvm use 8
- ./tests/bin/prepare-wordpress.sh
- mysql -e "set global wait_timeout = 3600;"
script:
- php -v
- phpunit --version
- ./tests/bin/run-travis.sh
sudo: false