Skip to content

Commit

Permalink
run mutation testing in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Kerin committed Dec 30, 2017
1 parent 07cffeb commit 8a9fc09
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ php:

dist: trusty

before_install:
- composer selfupdate

install:
- composer install --prefer-source --dev
- wget https://github.com/infection/infection/releases/download/0.7.0/infection.phar
- wget https://github.com/infection/infection/releases/download/0.7.0/infection.phar.pubkey
- chmod +x infection.phar

script:
- php vendor/bin/phpunit
- vendor/bin/phpstan analyze -l 4 src tests examples
- php vendor/bin/phpcs -n --standard=PSR1,PSR2 --report=full src/ tests/ examples/
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php infection.phar --min-msi=75 --min-covered-msi=75 --threads=4; fi
- php vendor/bin/phpstan analyze -l 4 src tests examples
- ./validate_examples.sh

after_success:
- wget https://scrutinizer-ci.com/ocular.phar
- sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ] && [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover build/docs/clover.xml; fi;'
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover build/docs/clover.xml; fi

matrix:
fast_finish: true
11 changes: 11 additions & 0 deletions infection.json.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"timeout": 10,
"source": {
"directories": [
"src"
]
},
"logs": {
"text": "infection-log.txt"
}
}
4 changes: 2 additions & 2 deletions tests/Types/IntegerBitSizeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace BitWasp\Buffertools\Tests\Types;


use BitWasp\Buffertools\Tests\BinaryTest;
use BitWasp\Buffertools\Types\Int128;
use BitWasp\Buffertools\Types\Int16;
Expand Down Expand Up @@ -44,7 +43,8 @@ public function getClassAndBitSize()
* @param string $integerClass
* @param int $bitSize
*/
public function testBitSize(string $integerClass, int $bitSize) {
public function testBitSize(string $integerClass, int $bitSize)
{
/** @var UintInterface|SignedIntInterface $integer */
$integer = new $integerClass();
$this->assertEquals($bitSize, $integer->getBitSize());
Expand Down

0 comments on commit 8a9fc09

Please sign in to comment.