forked from perftools/xhgui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
45 lines (39 loc) · 979 Bytes
/
.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
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
matrix:
include:
- php: 5.5
env: COVERAGE=1
services:
- mongodb
before_script:
- pecl install xhprof-beta
- echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo "extension = xhprof.so" >> ~/.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