Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/infection.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---

on: # yamllint disable-line rule:truthy
pull_request:
push:
branches:
- 4.x

name: 🧬 Mutation Tests

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

permissions:
contents: read

jobs:
infection:
name: Infection
uses: cycle/gh-actions/.github/workflows/infection.yml@master
secrets: inherit

...
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
[![Psalm Level](https://shepherd.dev/github/cycle/annotated/level.svg)](https://shepherd.dev/github/cycle/annotated)
[![Type Coverage](https://shepherd.dev/github/cycle/annotated/coverage.svg)](https://shepherd.dev/github/cycle/annotated)
[![Codecov](https://codecov.io/gh/cycle/annotated/branch/4.x/graph/badge.svg)](https://codecov.io/gh/cycle/annotated)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fcycle%2Fannotated%2F4.x)](https://dashboard.stryker-mutator.io/reports/github.com/cycle/annotated/4.x)

</div>

Expand Down
14 changes: 14 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@
"scripts": {
"cs:diff": "php-cs-fixer fix --dry-run -v --diff --config=vendor-bin/code-style/.php-cs-fixer.dist.php",
"cs:fix": "php-cs-fixer fix -v --config=vendor-bin/code-style/.php-cs-fixer.dist.php",
"infect": [
"Composer\\Config::disableProcessTimeout",
"@putenv XDEBUG_MODE=coverage",
"@putenv DB_DRIVERS=sqlite",
"infection --configuration=infection.json --threads=max"
],
"infect:ci": [
"Composer\\Config::disableProcessTimeout",
"@putenv XDEBUG_MODE=coverage",
"@putenv DB_DRIVERS=sqlite",
"infection --ansi --configuration=infection.json --logger-github --threads=max --show-mutations=0"
],
"psalm": "psalm -c vendor-bin/psalm/psalm.xml",
"psalm:baseline": "psalm -c vendor-bin/psalm/psalm.xml --set-baseline=vendor-bin/psalm/psalm-baseline.xml",
"psalm:ci": "psalm -c vendor-bin/psalm/psalm.xml --output-format=github --shepherd --show-info=false --stats --threads=4",
Expand All @@ -90,6 +102,8 @@
"test:unit": "testo --suite=Unit"
},
"scripts-descriptions": {
"infect": "Run mutation testing with Infection on the Unit and SQLite suites",
"infect:ci": "Run mutation testing in CI, failing below the minimum MSI",
"test:new-case": "Create a regression case for an issue: composer test:new-case -- <issue>"
},
"extra": {
Expand Down
30 changes: 17 additions & 13 deletions infection.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"timeout": 10,
"source": {
"directories": [
"src"
]
},
"logs": {
"text": "infection.log"
},
"mutators": {
"@default": true
}
}
"$schema": "vendor-bin/infection/vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"src"
]
},
"timeout": 10,
"minMsi": 80,
"minCoveredMsi": 80,
"testFramework": "testo",
"tmpDir": "runtime",
"logs": {
"stryker": {
"report": "4.x"
}
}
}
4 changes: 4 additions & 0 deletions vendor-bin/infection/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/composer.lock
/.*/
/skills.json
11 changes: 11 additions & 0 deletions vendor-bin/infection/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"require": {
"infection/infection": "^0.35.12",
"testo/bridge-infection": "^0.1.9"
},
"config": {
"allow-plugins": {
"infection/extension-installer": true
}
}
}
Loading