Skip to content

Commit

Permalink
Merge pull request #9 from shochdoerfer/feature/infection
Browse files Browse the repository at this point in the history
Add Infection
  • Loading branch information
shochdoerfer committed Jan 26, 2021
2 parents bc054cf + 7ae14a2 commit d7fecf9
Show file tree
Hide file tree
Showing 8 changed files with 1,075 additions and 9 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.3', '7.4', '8.0']
php-versions: ['7.4', '8.0']
composer-prefer-lowest: [false]
coveralls: [false]
include:
Expand All @@ -27,7 +27,7 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v1
tools: composer:v2
coverage: xdebug

- name: Install Composer dependencies
Expand All @@ -36,8 +36,10 @@ jobs:
- name: Install lowest CaptainHookPHP version
if: matrix.composer-prefer-lowest == true
run: |
composer remove captainhook/captainhook captainhook/plugin-composer
composer require --prefer-lowest captainhook/captainhook captainhook/plugin-composer
composer remove --dev captainhook/plugin-composer
composer remove captainhook/captainhook
composer require --prefer-lowest captainhook/captainhook
composer require --prefer-lowest --dev captainhook/plugin-composer
- name: Linting code
run: ./vendor/bin/phing lint
Expand All @@ -56,6 +58,11 @@ jobs:
if: matrix.coveralls == true
run: ./vendor/bin/phing unit-with-coverage

- name: Infection for added files
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
./vendor/bin/infection -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
- name: Coveralls report
if: matrix.coveralls == true
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.phpunit.result.cache
clover.xml
infection.log
/vendor
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This package provides an action for [Captain Hook](https://github.com/CaptainHoo

[![Build Status](https://github.com/bitExpert/captainhook-validateauthor/workflows/ci/badge.svg?branch=master)](https://github.com/bitExpert/captainhook-validateauthor/actions)
[![Coverage Status](https://coveralls.io/repos/github/bitExpert/captainhook-validateauthor/badge.svg?branch=master)](https://coveralls.io/github/bitExpert/captainhook-validateauthor?branch=master)
[![Infection MSI](https://badge.stryker-mutator.io/github.com/bitExpert/captainhook-validateauthor/master)](https://infection.github.io)


## Installation
Expand Down
7 changes: 7 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
</exec>
</target>

<target name="infection">
<exec executable="./vendor/bin/infection"
passthru="true"
checkreturn="true">
</exec>
</target>

<target name="analyse">
<exec executable="./vendor/bin/phpstan"
passthru="true"
Expand Down
4 changes: 4 additions & 0 deletions captainhook.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
{
"action": "./vendor/bin/phing analyse",
"options": []
},
{
"action": "./vendor/bin/phing infection",
"options": []
}
]
},
Expand Down
5 changes: 3 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
}
],
"require": {
"php": "^7.3.0|^8.0.0",
"php": "^7.4.0|^8.0.0",
"captainhook/captainhook": "^5.4"
},
"require-dev": {
Expand All @@ -20,7 +20,8 @@
"squizlabs/php_codesniffer": "^3.5",
"phing/phing": "^2.16",
"phpstan/phpstan": "^0.12",
"roave/security-advisories": "dev-latest"
"roave/security-advisories": "dev-latest",
"infection/infection": "^0.20.2"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit d7fecf9

Please sign in to comment.