Skip to content

Commit

Permalink
added coveralls reporting to travis
Browse files Browse the repository at this point in the history
  • Loading branch information
robfrawley committed Nov 24, 2016
1 parent a0dd9b8 commit 94c5de6
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 9 deletions.
4 changes: 4 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
---

coverage_clover : var/build/clover.xml
json_path : var/build/coveralls-upload.json
11 changes: 6 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/bin/
/phpunit.xml
composer.lock
composer.phar
vendor/
Tests/Functional/app/web/media/cache
.idea/
/composer.lock
/composer.phar
/vendor/
/Tests/Functional/app/web/media/cache
/.idea/
/var/
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,20 @@ matrix:

before_install:
- composer self-update
- if [ "${TRAVIS_PHP_VERSION}" == "5.3" ]; then composer remove --no-update --dev satooshi/php-coveralls; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ]; then echo "memory_limit = -1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini; fi;
- if [ "${SYMFONY_VERSION:0:3}" == "2.3" ]; then composer remove --dev friendsofphp/php-cs-fixer --no-update; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION}" != "5.3" ]; then composer require --dev league/flysystem:~1.0 --no-update; fi;
- if [ "${TRAVIS_PHP_VERSION}" != "hhvm" ] && [ "${TRAVIS_PHP_VERSION:0:1}" != "7" ]; then composer require --dev doctrine/mongodb-odm:~1.0 --no-update; yes "" | pecl -q install -f mongo; fi;
- if [ "${SYMFONY_VERSION:-x}" != "x" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" --no-update; fi;

install: composer update --prefer-source $COMPOSER_FLAGS
install:
- composer update --prefer-source $COMPOSER_FLAGS

script: ./bin/phpunit --coverage-text
script:
- ./bin/phpunit -vvv

after_script:
- if [ "${TRAVIS_PHP_VERSION}" != "5.3" ]; then bin/coveralls -vvv; fi;

...
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"friendsofphp/php-cs-fixer": "~2.0",
"phpunit/phpunit": "~4.3",
"psr/log": "~1.0",
"satooshi/php-coveralls": "~1.0",
"sllh/php-cs-fixer-styleci-bridge": "~2.1",
"symfony/browser-kit": "~2.3|~3.0",
"symfony/console": "~2.3|~3.0",
Expand Down
25 changes: 23 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>

<phpunit bootstrap="./Tests/bootstrap.php" colors="true" forceCoversAnnotation="true">
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/5.0/phpunit.xsd"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
syntaxCheck="true"
forceCoversAnnotation="true"
bootstrap="./Tests/bootstrap.php">

<testsuites>
<testsuite name="LiipImagineBundle test suite">
<testsuite name="liip/imagine-bundle test suite">
<directory suffix="Test.php">./Tests</directory>
</testsuite>
</testsuites>
Expand All @@ -18,4 +27,16 @@
</exclude>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="var/build/coverage/"/>
<log type="coverage-clover" target="var/build/clover.xml"/>
</logging>

<php>
<ini name="error_reporting" value="-1" />
<ini name="intl.default_locale" value="en" />
<ini name="intl.error_level" value="0" />
<ini name="memory_limit" value="-1" />
</php>
</phpunit>

0 comments on commit 94c5de6

Please sign in to comment.