Skip to content

Commit

Permalink
add support to coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
fagundes committed Dec 22, 2015
1 parent 59b8564 commit e8eed44
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ nbproject
vendor
composer.phar
composer.lock
.project
.project
clover.xml
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,27 @@ php:
- 5.3
- 5.4
- 5.5
- 5.6
- 5.6
- hhvm

matrix:
include:
- php: 5.6
env:
- EXECUTE_TEST_COVERALLS=true
allow_failures:
- php: hhvm

before_script:
before_install:
- composer selfupdate
- composer install --dev --prefer-dist
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then composer require --dev --no-update satooshi/php-coveralls ; fi

install:
- travis_retry composer install --prefer-dist --ignore-platform-reqs

script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/phpunit --coverage-clover clover.xml ; fi
- if [[ $EXECUTE_TEST_COVERALLS != 'true' ]]; then ./vendor/bin/phpunit ; fi

after_script:
- if [[ $EXECUTE_TEST_COVERALLS == 'true' ]]; then ./vendor/bin/coveralls ; fi
11 changes: 8 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,19 @@
"spipu/html2pdf":"~4.4"
},
"require-dev": {
"phpunit/phpunit": "*",
"squizlabs/php_codesniffer": "~2"
"phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2",
"satooshi/php-coveralls": "^0.7.1"
},
"autoload":
{
"psr-4":
{
"Zff\\Html2Pdf\\": "src/",
"Zff\\Html2Pdf\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"ZffTest\\Html2Pdf\\": "test/"
}
},
Expand Down
5 changes: 5 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@
<directory>./test/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist addUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
</phpunit>

0 comments on commit e8eed44

Please sign in to comment.