-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
86 lines (74 loc) · 2.26 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
74
75
76
77
78
79
80
81
82
83
84
85
86
language: php
php:
# see http://php.net/supported-versions.php
- '7.0' # deprecated
- '7.1' # Until 1 Dec 2019
- '7.2' # Until 30 Nov 2020
- '7.3' # Until 6 Dec 2021
addons:
apt:
packages:
- parallel
env:
global:
- PHPUNIT_VERSION="~7|~8"
- COMPOSER_CACHE_DIR=/home/travis/.composer
- WOO_VERSION="3.7.*"
- WP_VERSION="*"
matrix:
# see https://codex.wordpress.org/WordPress_Versions
# see https://phpunit.de/supported-versions.html
- WP_VERSION=5.2.*
- WP_VERSION=5.1.* WOO_VERSION="3.6.*"
- WP_VERSION=5.0.* WOO_VERSION="3.5.*"
- WP_VERSION=4.9.* WOO_VERSION="3.4.*"
- WP_VERSION=4.8.* WOO_VERSION="3.3.*"
- WP_VERSION=4.7.* WOO_VERSION="3.2.*"
- WP_VERSION=4.6.* WOO_VERSION="3.1.*"
- WP_VERSION=4.5.* WOO_VERSION="3.0.*"
- WP_VERSION=dev-master
matrix:
include:
# additional combination among env (as above)
- php: '5.6'
env: PHPUNIT_VERSION=~5 WP_VERSION=4.9.*
- php: '7.0'
# Intermediate version tests due to unstable SemVer
- php: '7.1'
env: PHPUNIT_VERSION="~7" WP_VERSION=4.9.*
# in the process to achieve support
allow_failures:
- php: '5.6'
- php: '7.0'
- env: WP_VERSION=dev-master
- env: PHPUNIT_VERSION="~7"
# Do not wait for allowed failures
fast_finish: true
services:
- mysql
cache:
directories:
- /home/travis/.composer
before_install:
- mysql -e 'CREATE DATABASE dev;'
# Try supporting other versions
- |
composer require --update-with-dependencies --ignore-platform-reqs \
johnpbloch/wordpress:$WP_VERSION \
phpunit/phpunit:$PHPUNIT_VERSION \
wpackagist-plugin/woocommerce:$WOO_VERSION
install:
- vendor/bin/wp --allow-root config create --force --dbuser=travis --dbpass="" --dbhost="127.0.0.1" --skip-check
- vendor/bin/wp --allow-root core install --skip-email
- vendor/bin/wp --allow-root plugin activate --all
- for L in etc/*; do ln -s $L; done
- ln -s etc/.coveralls.yml
script:
- composer validate --strict --no-check-lock
- vendor/bin/phpunit --coverage-clover coverage.xml
- vendor/bin/phpstan analyse --no-progress lib/
after_script:
# upload coverage.xml file to Coveralls to analyze it
- vendor/bin/coveralls --verbose
after_failure:
- cat srv/wp-content/debug.log || true