forked from perftools/xhgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
47 lines (42 loc) · 1.23 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
language: php
php:
- 5.5
- 5.6
- 7.0
matrix:
include:
- php: 5.5
env: COVERAGE=1
services:
- mongodb
before_script:
- pecl install xhprof-beta
- pecl install mongodb || true
- echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- git clone https://github.com/tideways/php-profiler-extension.git
- cd php-profiler-extension && phpize && ./configure && make && make install && cd ..
- echo "extension=tideways.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "tideways.auto_prepend_library=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- phpenv rehash
- composer install --prefer-dist --dev
- chmod -R 0777 cache/
script:
- >
if [[ "$COVERAGE" == "0" ]]; then
echo;
echo "Running unit tests";
phpunit
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Running unit tests with code-coverage";
phpunit --coverage-clover=unittest-coverage.clover
fi
- >
if [[ "$COVERAGE" == "1" ]]; then
echo;
echo "Uploading code coverage results";
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover
fi