Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Alexander Zamponi
committed
Mar 12, 2017
1 parent
ea21993
commit 5bcc88b
Showing
6 changed files
with
134 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
before_commands: | ||
- "composer update --prefer-source" | ||
|
||
tools: | ||
external_code_coverage: | ||
timeout: 1800 | ||
php_code_coverage: | ||
enabled: true | ||
php_code_sniffer: | ||
enabled: false | ||
php_cpd: | ||
enabled: true | ||
excluded_dirs: ["tests", "vendor"] | ||
php_cs_fixer: | ||
enabled: true | ||
config: | ||
level: all | ||
filter: | ||
paths: ["src/*", "tests/*"] | ||
php_loc: | ||
enabled: true | ||
excluded_dirs: ["tests", "vendor"] | ||
php_mess_detector: | ||
enabled: true | ||
filter: | ||
paths: ["src/*"] | ||
php_pdepend: | ||
enabled: true | ||
excluded_dirs: ["tests", "vendor"] | ||
php_analyzer: | ||
enabled: true | ||
filter: | ||
paths: ["src/*", "tests/*"] | ||
php_hhvm: | ||
enabled: true | ||
filter: | ||
paths: ["src/*", "tests/*"] | ||
sensiolabs_security_checker: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
language: php | ||
|
||
cache: false | ||
sudo: false | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
- hhvm | ||
|
||
before_script: | ||
- composer update | ||
- if [ "$DEPENDENCIES" = 'low' ] ; then composer update --prefer-source --prefer-lowest --prefer-stable; fi | ||
- git clone https://github.com/padraic/humbug.git && cd humbug && composer install && cd .. | ||
|
||
script: | ||
- ./vendor/bin/phpunit --disallow-test-output --report-useless-tests --coverage-clover ./clover.xml | ||
- ./vendor/bin/phpcs | ||
- ./humbug/bin/humbug | ||
- ./build/check-humbug-mutators.php | ||
|
||
env: | ||
matrix: | ||
- DEPENDENCIES="high" | ||
- DEPENDENCIES="low" | ||
|
||
matrix: | ||
allow_failures: | ||
- php: hhvm | ||
|
||
after_script: | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover ./clover.xml | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env php | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
call_user_func(function () { | ||
$log = json_decode(file_get_contents(__DIR__ . '/../humbug-log.json'), true); | ||
|
||
if (! array_key_exists('escapes', $log['summary'])) { | ||
throw new \UnexpectedValueException('Could not find "escapes" in summary'); | ||
} | ||
|
||
echo file_get_contents(__DIR__ . '/../humbug-log.txt'); | ||
|
||
if ($log['summary']['escapes']) { | ||
throw new \UnexpectedValueException('Humbug reported escaped mutants'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"timeout": 30, | ||
"source": { | ||
"directories": [ | ||
"src" | ||
] | ||
}, | ||
"logs": { | ||
"text": "humbug-log.txt", | ||
"json": "humbug-log.json" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Custom"> | ||
<description>custom code-style</description> | ||
<file>./src</file> | ||
<file>./tests</file> | ||
<rule ref="PSR2"> | ||
<exclude name="Generic.Files.LineLength"/> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit bootstrap="./tests/InvoiceNinjaModuleTest/Bootstrap.php" | ||
colors="true" | ||
verbose="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
backupGlobals="false" | ||
backupStaticAttributes="false" | ||
stopOnFailure="false" | ||
syntaxCheck="true" > | ||
<testsuites> | ||
<testsuite name="InvoiceNinjaModule tests"> | ||
<directory suffix=".php">./tests/InvoiceNinjaModuleTest/</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">./src/</directory> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |