From 006e1dc11ef29ebdda1599174b723e706645ff25 Mon Sep 17 00:00:00 2001 From: Artjoms Nemiro Date: Sun, 24 Sep 2017 15:40:41 +0300 Subject: [PATCH 1/4] Add after hook and update phpunit --- .travis.yml | 6 +++++- phpunit.xml.dist | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a79fea0..4e55b2f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,4 +17,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 build/logs/clover.xml + +after_success: + - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/coveralls -v; fi;' \ 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 From 8c837fc7b552957a4958d2642e0273cd3a6cfbb9 Mon Sep 17 00:00:00 2001 From: Artjoms Nemiro Date: Sun, 24 Sep 2017 15:52:31 +0300 Subject: [PATCH 2/4] Add lib of clover --- .coveralls.yml | 3 +++ .travis.yml | 2 +- README.md | 2 +- composer.json | 5 +++-- phpunit.xml.dist | 3 +++ 5 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 .coveralls.yml diff --git a/.coveralls.yml b/.coveralls.yml new file mode 100644 index 0000000..e30743e --- /dev/null +++ b/.coveralls.yml @@ -0,0 +1,3 @@ +service_name: travis-ci +src_dir: src +coverage_clover: build/logs/clover.xml diff --git a/.travis.yml b/.travis.yml index 4e55b2f..3fb47c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,4 +21,4 @@ script: - phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml after_success: - - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then php vendor/bin/coveralls -v; fi;' \ No newline at end of file + - travis_retry 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 6629a91..223b48b 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,4 +18,7 @@ + + + \ No newline at end of file From 294aa4051abd5614b1ee83380ec6ec361e3faccf Mon Sep 17 00:00:00 2001 From: Artjoms Nemiro Date: Sun, 24 Sep 2017 16:12:32 +0300 Subject: [PATCH 3/4] Fix paths and add json path to ocoveralls conf --- .coveralls.yml | 3 ++- .travis.yml | 4 ++-- phpunit.xml.dist | 3 --- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index e30743e..4260292 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,3 +1,4 @@ service_name: travis-ci src_dir: src -coverage_clover: build/logs/clover.xml +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 3fb47c8..1c46473 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_script: - travis_retry composer install --no-interaction --prefer-dist script: - - phpunit --configuration phpunit.xml.dist --coverage-clover build/logs/clover.xml + - phpunit --configuration phpunit.xml.dist --coverage-clover ./tests/logs/clover.xml after_success: - - travis_retry php vendor/bin/coveralls -v \ No newline at end of file + - php vendor/bin/coveralls -v \ No newline at end of file diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 223b48b..6629a91 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -18,7 +18,4 @@ - - - \ No newline at end of file From 9df6ed9e6e5d8042c11181a1434f145a86174c7a Mon Sep 17 00:00:00 2001 From: Artjoms Nemiro Date: Sun, 24 Sep 2017 16:19:29 +0300 Subject: [PATCH 4/4] Remove src prop and remove travis php image nightly --- .coveralls.yml | 1 - .travis.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.coveralls.yml b/.coveralls.yml index 4260292..98f269c 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,4 +1,3 @@ service_name: travis-ci -src_dir: src 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 1c46473..dadebc9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ dist: precise php: - 7.0 - 7.1 - - nightly sudo: false