forked from timber/timber
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
120 lines (107 loc) · 3.88 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# TravisCI configuration for timber/timber
os: linux
dist: xenial
services: mysql
language: php
addons:
apt:
packages:
- libwebp-dev
- apt-transport-https
- apt-utils
- python-software-properties
php:
- 7.2
env:
global:
- TMPDIR=/tmp
- COVERALLS_PARALLEL=true
jobs:
- WP_VERSION=4.9.8 WP_MULTISITE=0
- WP_VERSION=4.9.8 WP_MULTISITE=1
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
jobs:
include:
- name: "Coverage: WP 4.9 on PHP 5.6"
php: 5.6
env: WP_VERSION=4.9.8 WP_MULTISITE=0 PREFER_LOWEST="--prefer-lowest --prefer-stable"
before_install: skip
install:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- composer update $PREFER_LOWEST --prefer-source
- composer require --dev 'satooshi/php-coveralls:1.0.*'
script:
- mkdir -p build/logs
- vendor/phpunit/phpunit/phpunit -c phpunit.xml --verbose --coverage-clover build/logs/clover.xml
after_success:
- vendor/bin/coveralls -v
- name: "Coverage: ImageMagick extension on PHP 7.4"
php: 7.4
env: WP_VERSION=latest WP_MULTISITE=0
before_install:
- phpenv config-rm xdebug.ini
- yes '' | pecl install pcov
# Install imagick PHP extension
- pear config-set preferred_state beta
- pecl channel-update pecl.php.net
- yes '' | pecl install imagick
install:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- composer update $PREFER_LOWEST --prefer-source
- composer require --dev 'pcov/clobber:^2.0'
- vendor/bin/pcov clobber
- composer require --dev 'satooshi/php-coveralls:1.0.*'
script:
- mkdir -p build/logs
- vendor/phpunit/phpunit/phpunit -c phpunit.xml --verbose --coverage-clover build/logs/clover.xml
after_success:
- vendor/bin/coveralls -v
- name: "Coverage: WP multisite on PHP 7.4"
php: 7.4
env: WP_VERSION=latest WP_MULTISITE=1
before_install:
- phpenv config-rm xdebug.ini
- yes '' | pecl install pcov
install:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- composer update $PREFER_LOWEST --prefer-source
- composer require --dev 'pcov/clobber:^2.0'
- vendor/bin/pcov clobber
- composer require --dev 'satooshi/php-coveralls:1.0.*'
script:
- mkdir -p build/logs
- vendor/phpunit/phpunit/phpunit -c phpunit.xml --verbose --coverage-clover build/logs/clover.xml
after_success:
- vendor/bin/coveralls -v
- name: "WebP support on PHP 7.4"
php: 7.4
env: WP_VERSION=latest WP_MULTISITE=0
before_install:
# Install PHP with WebP support
- LC_ALL=C.UTF-8 sudo add-apt-repository -y ppa:ondrej/php
- sudo apt-get update
- sudo apt-get install -y "php${TRAVIS_PHP_VERSION}-cli" "php${TRAVIS_PHP_VERSION}-gd" "php${TRAVIS_PHP_VERSION}-xml" "php${TRAVIS_PHP_VERSION}-mysql"
- export PATH="/usr/bin:${PATH}"
- php --rf imagewebp
install:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- composer update $PREFER_LOWEST --prefer-source
script:
- vendor/phpunit/phpunit/phpunit -c phpunit.xml --verbose ./tests/test-timber-image-towebp.php
after_success: skip
cache:
directories:
- "${HOME}/.composer/cache"
before_install:
# phpenv config-add myconfig.ini --with-webp-dir
- phpenv config-rm xdebug.ini
install:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- composer update $PREFER_LOWEST --prefer-source
script:
- vendor/phpunit/phpunit/phpunit -c phpunit-nocover.xml --verbose
notifications:
webhooks:
# https://docs.coveralls.io/parallel-build-webhook
- 'https://coveralls.io/webhook'