Skip to content

Commit 8a9fc09

Browse files
author
Thomas Kerin
committed
run mutation testing in CI
1 parent 07cffeb commit 8a9fc09

File tree

3 files changed

+19
-8
lines changed

3 files changed

+19
-8
lines changed

.travis.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ php:
88

99
dist: trusty
1010

11-
before_install:
12-
- composer selfupdate
13-
1411
install:
1512
- composer install --prefer-source --dev
13+
- wget https://github.com/infection/infection/releases/download/0.7.0/infection.phar
14+
- wget https://github.com/infection/infection/releases/download/0.7.0/infection.phar.pubkey
15+
- chmod +x infection.phar
1616

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

2324
after_success:
24-
- wget https://scrutinizer-ci.com/ocular.phar
25-
- 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;'
25+
- if [ "$TRAVIS_PHP_VERSION" != "nightly" ]; then php ocular.phar code-coverage:upload --format=php-clover build/docs/clover.xml; fi
2626

2727
matrix:
2828
fast_finish: true

infection.json.dist

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"timeout": 10,
3+
"source": {
4+
"directories": [
5+
"src"
6+
]
7+
},
8+
"logs": {
9+
"text": "infection-log.txt"
10+
}
11+
}

tests/Types/IntegerBitSizeTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
namespace BitWasp\Buffertools\Tests\Types;
44

5-
65
use BitWasp\Buffertools\Tests\BinaryTest;
76
use BitWasp\Buffertools\Types\Int128;
87
use BitWasp\Buffertools\Types\Int16;
@@ -44,7 +43,8 @@ public function getClassAndBitSize()
4443
* @param string $integerClass
4544
* @param int $bitSize
4645
*/
47-
public function testBitSize(string $integerClass, int $bitSize) {
46+
public function testBitSize(string $integerClass, int $bitSize)
47+
{
4848
/** @var UintInterface|SignedIntInterface $integer */
4949
$integer = new $integerClass();
5050
$this->assertEquals($bitSize, $integer->getBitSize());

0 commit comments

Comments
 (0)