-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
50 lines (43 loc) · 1.92 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
language: php
notifications:
email:
on_success: never
on_failure: change
branches:
only:
- master
- develop
php:
- 5.6
- 7.0
- 7.1
env:
- WP_VERSION=latest WP_MULTISITE=0
- WP_VERSION=latest WP_MULTISITE=1
before_script:
- bash bin/install-wp-tests.sh wordpress_test root '' localhost $WP_VERSION
- export PATH="$HOME/.composer/vendor/bin:$PATH"
- |
if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then
composer require "phpunit/phpunit=5.6.*"
else
composer require "phpunit/phpunit=4.8.*"
fi
composer require "phpunit/phpcov"
composer require "codeclimate/php-test-reporter"
- composer install
- mkdir logs
- export PLUGIN_HOME=$PWD
- cd /tmp/wordpress/wp-content/plugins/ && git clone https://github.com/pcfreak30/rocket-async-css
- git clone https://github.com/wp-media/wp-rocket
- git clone https://github.com/Hube2/root-relative-urls
- svn checkout http://plugins.svn.wordpress.org/the-preloader/trunk the-preloader -qq && cd $PLUGIN_HOME
script:
- ./vendor/bin/phpunit --coverage-php logs/standalone_unit.cov
- ./vendor/bin/phpunit --coverage-php logs/standalone_integration.cov --configuration phpunit_integration.xml.dist
- TEST_PLUGIN="rocket-async-css/rocket-async-css.php,wp-rocket/wp-rocket.php,the-preloader/preloader.php" ./vendor/bin/phpunit --coverage-php logs/rocket-async-css.cov --group rocket-async-css --configuration phpunit_integration.xml.dist
- TEST_PLUGIN="root-relative-urls/sb_root_relative_urls.php" ./vendor/bin/phpunit --coverage-php logs/root-relative-urls.cov --group root-relative-urls --configuration phpunit_integration.xml.dist
- TEST_PLUGIN="wp-rocket/wp-rocket.php" ./vendor/bin/phpunit --coverage-php logs/wp-rocket.cov --group wp-rocket --configuration phpunit_integration.xml.dist
after_success:
- ./vendor/bin/phpcov merge --clover=logs/clover.xml logs/
- ./vendor/bin/test-reporter --coverage-report=logs/clover.xml