From 097ac83205b4333c6e975dd1e57fadcc577ae2e7 Mon Sep 17 00:00:00 2001 From: Ilyar Date: Tue, 4 Jun 2019 10:57:36 +0300 Subject: [PATCH] add infection --- .gitignore | 1 + .travis.yml | 2 +- composer.json | 7 ++++++- infection.json.dist | 15 +++++++++++++++ 4 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 infection.json.dist diff --git a/.gitignore b/.gitignore index d4843b1..3fd9cd6 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ build/ .project composer.lock coverage.xml +infection.json diff --git a/.travis.yml b/.travis.yml index 1831694..aa2a840 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,7 +9,7 @@ before_script: - travis_retry composer update --no-interaction script: - - vendor/bin/phpunit --coverage-clover=coverage.xml + - composer test after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/composer.json b/composer.json index aeb9efd..da05369 100644 --- a/composer.json +++ b/composer.json @@ -10,11 +10,12 @@ } ], "require": { - "php": ">=5.4", + "php": ">=5.4 || >=7.1 || >=7.2", "doctrine/dbal": "~2.4", "doctrine/orm": "~2.4" }, "require-dev": { + "infection/infection": "^0.13.1", "phpunit/phpunit": "^6.5" }, "autoload": { @@ -27,6 +28,10 @@ "OpsWay\\Tests\\": "tests/" } }, + "scripts": { + "test": "infection --threads=$(nproc) --min-msi=88 --min-covered-msi=93 --test-framework-options='--coverage-clover=build/coverage.xml'", + "cover": "phpunit --coverage-clover=build/coverage.xml" + }, "extra": { "branch-alias": { "dev-master": "1.0-dev" diff --git a/infection.json.dist b/infection.json.dist new file mode 100644 index 0000000..3e06143 --- /dev/null +++ b/infection.json.dist @@ -0,0 +1,15 @@ +{ + "source": { + "directories": [ + "src" + ] + }, + "timeout": 10, + "logs": { + "text": "build/infection/mutants.log", + "summary": "build/infection/summary.log", + "perMutator": "build/infection/per-mutator.md" + }, + "tmpDir": "build/infection", + "testFramework": "phpunit" +}