Skip to content

Commit

Permalink
Add coveralls support
Browse files Browse the repository at this point in the history
  • Loading branch information
giggsey committed Nov 10, 2013
1 parent ffe2a42 commit 3d1cdd0
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -23,4 +23,5 @@ Session.vim
.netrwhist
composer.phar
composer.lock
libphonenumber-data-dir/
libphonenumber-data-dir/
build/logs/
15 changes: 10 additions & 5 deletions .travis.yml
@@ -1,15 +1,20 @@
language: php

php:
- 5.3
- 5.4
- 5.5

before_script:
- composer install
- wget http://getcomposer.org/composer.phar
- php composer.phar install --dev --no-interaction
- mkdir -p build/logs

script:
- ./vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml

# omitting "script:" will default to phpunit
# use the $DB env variable to determine the phpunit.xml to use
script: ./vendor/bin/phpunit --coverage-text
after_script:
- php vendor/bin/coveralls -v --exclude-no-stmt

notifications:
irc: "irc.appliedirc.com#applied"
irc: "irc.appliedirc.com#applied"
2 changes: 1 addition & 1 deletion README.md
@@ -1,4 +1,4 @@
# libphonenumber for PHP [![Build Status](https://travis-ci.org/giggsey/libphonenumber-for-php.png?branch=master)](https://travis-ci.org/giggsey/libphonenumber-for-php)
# libphonenumber for PHP [![Build Status](https://travis-ci.org/giggsey/libphonenumber-for-php.png?branch=master)](https://travis-ci.org/giggsey/libphonenumber-for-php) [![Coverage Status](https://coveralls.io/repos/giggsey/libphonenumber-for-php/badge.png)](https://coveralls.io/r/giggsey/libphonenumber-for-php)

[![Total Downloads](https://poser.pugx.org/giggsey/libphonenumber-for-php/downloads.png)](https://packagist.org/packages/giggsey/libphonenumber-for-php)
[![Latest Stable Version](https://poser.pugx.org/giggsey/libphonenumber-for-php/v/stable.png)](https://packagist.org/packages/giggsey/libphonenumber-for-php)
Expand Down
3 changes: 2 additions & 1 deletion Tests/bootstrap.php
@@ -1,8 +1,9 @@
<?php
ini_set('memory_limit', '1024M');
/** @var \Composer\Autoload\ClassLoader $loader */
$loader = require __DIR__ . '/../vendor/autoload.php';
$loader->add('libphonenumber\\Tests\\', __DIR__);
$loader->add('libphonenumber\\buildtools\\', __DIR__ . '/../build/');


/* EOF */
/* EOF */
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -33,7 +33,8 @@
},
"require-dev": {
"phpunit/phpunit": "~3.7",
"symfony/console": "~2.3.5"
"symfony/console": "~2.3.5",
"satooshi/php-coveralls": "~0.6"
},
"extra": {
"branch-alias": {
Expand Down
11 changes: 11 additions & 0 deletions phpunit.xml.dist
Expand Up @@ -11,6 +11,17 @@
<filter>
<whitelist>
<directory suffix=".php">./src/</directory>
<exclude>
<!-- Exclude data directories, and files -->
<directory suffix=".php">./src/libphonenumber/data/</directory>
<directory suffix=".php">./src/libphonenumber/carrier/data/</directory>
<directory suffix=".php">./src/libphonenumber/geocoding/data/</directory>
<directory suffix=".php">./src/libphonenumber/timezone/data/</directory>
<file>./src/libphonenumber/AlternateFormatsCountryCodeSet.php</file>
<file>./src/libphonenumber/CountryCodeToRegionCodeMap.php</file>
<file>./src/libphonenumber/CountryCodeToRegionCodeMapForTesting.php</file>
<file>./src/libphonenumber/RegionCode.php</file>
</exclude>
</whitelist>
</filter>

Expand Down

0 comments on commit 3d1cdd0

Please sign in to comment.