diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..98f269c --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-ci +coverage_clover: tests/logs/clover.xml +json_path: tests/logs/coveralls-upload.json \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a79fea0..dadebc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ dist: precise php: - 7.0 - 7.1 - - nightly sudo: false @@ -17,4 +16,8 @@ before_script: - travis_retry composer self-update - travis_retry composer install --no-interaction --prefer-dist -script: phpunit --configuration phpunit.xml.dist \ No newline at end of file +script: + - phpunit --configuration phpunit.xml.dist --coverage-clover ./tests/logs/clover.xml + +after_success: + - php vendor/bin/coveralls -v \ No newline at end of file diff --git a/README.md b/README.md index 7ff120e..93410aa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## Structure Type Validation [![Build Status](https://travis-ci.org/LinMAD/StructureTypeValidation.svg?branch=master)](https://travis-ci.org/LinMAD/StructureTypeValidation) - +[![Coverage Status](https://coveralls.io/repos/github/LinMAD/StructureTypeValidation/badge.svg?branch=master)](https://coveralls.io/github/LinMAD/StructureTypeValidation?branch=master) Light and simple structure validator. Do validation of yours structures as expected. diff --git a/composer.json b/composer.json index 71e3c24..7626568 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,8 @@ "php": ">=7" }, "require-dev": { - "phpunit/phpunit": "6.3.*" + "phpunit/phpunit": "6.3.*", + "php-coveralls/php-coveralls": "^1.0" }, "autoload": { "psr-4": { @@ -29,4 +30,4 @@ "StructureValidator\\Test\\": "test/StructureValidator/" } } -} \ No newline at end of file +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 4fa46a9..6629a91 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,4 +9,13 @@ ./test/StructureValidator/ + + + ./src + + ./vendor + ./tests + + + \ No newline at end of file