Skip to content

Commit

Permalink
Merge pull request #84 from lcobucci/fix/use-external-coverage
Browse files Browse the repository at this point in the history
Using external coverage (and keeping track of just unit tests coverage).
  • Loading branch information
lcobucci committed Apr 16, 2016
2 parents 397d8f5 + fd30397 commit dab944a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 18 deletions.
14 changes: 12 additions & 2 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,21 @@ tools:
php_pdepend: true
php_analyzer: true
php_changetracking: true
sensiolabs_security_checker: true
php_mess_detector: true
php_code_coverage: true
external_code_coverage:
timeout: 1800
php_code_sniffer:
enabled: true
config:
standard: "PSR2"
php_mess_detector: true
php_cpd:
enabled: true
excluded_dirs: ["test", "vendor"]
php_loc:
enabled: true
excluded_dirs: ["test", "vendor"]
checks:
php:
code_rating: true
Expand Down Expand Up @@ -50,7 +61,6 @@ checks:
verify_access_scope_valid: true
verify_argument_usable_as_reference: true
verify_property_names: true

filter:
excluded_paths:
- test/*
3 changes: 0 additions & 3 deletions .styleci.yml

This file was deleted.

11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@ sudo: false
php:
- 7.0
- hhvm
- hhvm-nightly

matrix:
allow_failures:
- php: hhvm
- php: hhvm-nightly

before_script:
- composer selfupdate
- composer install --prefer-dist -o

script:
- ./vendor/bin/phpunit --coverage-clover ./clover.xml test/unit
- ./vendor/bin/phpunit test/functional

after_script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"lcobucci/jose-parsing": "~2.1"
},
"require-dev": {
"phpunit/phpunit": "~5.1",
"squizlabs/php_codesniffer": "~2.3",
"phpmd/phpmd": "~2.2",
"phpunit/phpunit": "~5.3",
"squizlabs/php_codesniffer": "~2.6",
"phpmd/phpmd": "~2.4",
"phpunit/php-invoker": "~1.1",
"mikey179/vfsStream": "~1.5",
"mikey179/vfsStream": "~1.6",
"mdanter/ecc": "~0.3"
},
"suggest":{
Expand Down
14 changes: 8 additions & 6 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
colors="true"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTestSize="true"
beStrictAboutTestsThatDoNotTestAnything="true"
beStrictAboutTodoAnnotatedTests="true"
checkForUnintentionallyCoveredCode="true"
beStrictAboutChangesToGlobalState="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutResourceUsageDuringSmallTests="true"
forceCoversAnnotation="true">
<testsuites>
<testsuite name="Unit Test Suite">
Expand All @@ -20,12 +22,12 @@
<directory>test/functional</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>

<blacklist>
<directory suffix=".php">vendor</directory>
</blacklist>
Expand Down

0 comments on commit dab944a

Please sign in to comment.