Skip to content

Commit

Permalink
[WIP] Fix false positive in Travis CI
Browse files Browse the repository at this point in the history
The tests at https://travis-ci.org/perftools/xhgui/builds/475018345
for perftools#252 are passing on
for "PHP 7" and on "PHP 5 Coverage", which doesn't make sense.
  • Loading branch information
Krinkle committed Jan 4, 2019
1 parent 7b993b0 commit ab07d70
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
language: php

php:
- 5.5
- 5.6
- 7.0
- 5.6
- 5.5

matrix:
include:
Expand All @@ -13,8 +13,8 @@ matrix:
services:
- mongodb

before_script:
- bash .travis/install.sh
install:
- .travis/install.sh

script:
- bash .travis/run.sh
- .travis/run.sh
6 changes: 3 additions & 3 deletions .travis/install.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
pecl install mongodb || true
echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
#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
Expand All @@ -11,11 +11,11 @@ if [[ "$TRAVIS_PHP_VERSION" == "5.5" ]] || [[ "$TRAVIS_PHP_VERSION" == "5.6" ]];
echo "tideways.auto_prepend_library=0" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
else
git checkout master
echo "extension=tideways_xhprof.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
echo "extension=tideways_xhprof.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
fi

phpize && ./configure && make && make install && cd ..

phpenv rehash
composer install --prefer-dist --dev
composer install --prefer-dist
chmod -R 0777 cache/
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
"phpunit/phpunit": "4.*|5.*",
"ext-dom": "*"
},
"scripts": {
"test": "phpunit"
},
"suggest": {
"ext-xhprof": "You need to install either xhprof or uprofiler to use XHGui.",
"ext-uprofiler": "You need to install either xhprof or uprofiler to use XHGui.",
Expand Down
4 changes: 2 additions & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<!-- blacklist the tests and vendor directory from code coverage-->
<filter>
<blacklist>
<directory suffix=".php">./web/vendor</directory>
<directory suffix=".php">./vendor</directory>
</blacklist>
</filter>

<testsuites>
<testsuite name="All" suffix="Test.php">
<testsuite>
<directory>./tests</directory>
</testsuite>
</testsuites>
Expand Down

0 comments on commit ab07d70

Please sign in to comment.