forked from Zodiac1978/tl-normalizer
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
101 lines (92 loc) · 3.08 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
language: php
sudo: false
dist: xenial
services: mysql
notifications:
email: false
cache:
directories:
- $HOME/.build
matrix:
include:
- php: nightly
env: WP_VERSION=5.2
- php: 7.3
env: WP_VERSION=5.2.2 ICU_VERSION=64.2
- php: 7.3
env: WP_VERSION=5.1.1 CODE_COVERAGE=1
- php: 7.2
env: WP_VERSION=5.2.2
- php: 7.2
env: WP_VERSION=5.1.1
- php: 7.2
env: WP_VERSION=5.1 ICU_VERSION=64.1
- php: 7.2
env: WP_VERSION=5.0.4
- php: 7.2
env: WP_VERSION=5.0
- php: 7.2
env: WP_VERSION=4.9.10
- php: 7.2
env: WP_VERSION=4.9
- php: 7.2
env: WP_VERSION=4.8.9
- php: 7.1
env: WP_VERSION=5.2.1 ICU_VERSION=64.2
- php: 7.1
env: WP_VERSION=5.1
- php: 7.1
env: WP_VERSION=5.0.3
- php: 7.1
env: WP_VERSION=4.9.1
- php: 7.1
env: WP_VERSION=4.8
- php: 7.1
env: WP_VERSION=4.7.13
- php: 7.0
env: WP_VERSION=5.2.2
- php: 7.0
env: WP_VERSION=4.6.6
- php: 7.0
env: WP_VERSION=4.5.9
- php: 5.6
env: WP_VERSION=5.2.2
- php: 5.6
env: WP_VERSION=4.4.10
- php: 5.6
env: WP_VERSION=4.3.11
- php: 5.6
env: WP_VERSION=3.9.13
- php: 5.5
env: WP_VERSION=4.2.15
dist: trusty
- php: 5.4
env: WP_VERSION=4.1.18
dist: trusty
- php: 5.3
env: WP_VERSION=4.0.18
dist: precise
- php: 5.2
env: WP_VERSION=3.9.13
dist: precise
install:
- npm install grunt-cli
- npm install
- PHP_VERSION=$(php -r 'echo substr(PHP_VERSION, 0, strspn(PHP_VERSION, "0123456789."));')
- if [[ $PHP_VERSION = 5.2* ]]; then pecl install phar; yes '' | pecl install intl; else bash bin/install-wp-cli.sh $PHP_VERSION; fi
- sudo touch /var/log/php_errors.log && sudo chmod a+rw /var/log/php_errors.log
before_script:
- if [[ -v ICU_VERSION ]]; then bash bin/build-php-icu.sh $ICU_VERSION $PHP_VERSION; UNFC_PHP=$HOME/.build/php-$PHP_VERSION-icu-$ICU_VERSION/bin/php; else UNFC_PHP=php; fi
- if [[ ! -v CODE_COVERAGE ]]; then phpenv config-rm xdebug.ini || true; fi
- if [[ $PHP_VERSION = 5.2* ]]; then sed -i -e '/^extension=mysql/d' php-cli.ini; else sed -i -e '/^extension=\(intl\|mysql\|phar\)/d' php-cli.ini; fi
- if [[ $PHP_VERSION = [78]* ]]; then UNFC_PHPUNIT=bin/phpunit-6.5.14; elif [[ $PHP_VERSION = 5.6* ]]; then UNFC_PHPUNIT=bin/phpunit-5.7.27; elif [[ $PHP_VERSION = 5.[345]* ]]; then UNFC_PHPUNIT=bin/phpunit-4.8.36; elif [[ $PHP_VERSION = 5.2* ]]; then UNFC_PHPUNIT=bin/phpunit-3.6.12x; else UNFC_PHPUNIT=$(which phpunit); fi
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- $UNFC_PHP --info
script:
- echo UNFC_PHP $UNFC_PHP UNFC_PHPUNIT $UNFC_PHPUNIT
- PHPRC=. WP_TESTS_DIR=/tmp/wordpress-tests-lib $UNFC_PHP $UNFC_PHPUNIT --verbose ${CODE_COVERAGE:+--coverage-clover} ${CODE_COVERAGE:+clover.xml}
- ln -s /tmp/wordpress src && WP_TESTS_DIR=/tmp/wordpress-tests-lib grunt --verbose test_qunit
after_success:
- if [[ -v CODE_COVERAGE ]]; then env -u TRAVIS_CMD && bash <(curl -s https://codecov.io/bash); fi
after_failure:
- cat /var/log/php_errors.log || true