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:
- 1.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/testing/level.svg)](https://shepherd.dev/github/cycle/testing)
[![Type Coverage](https://shepherd.dev/github/cycle/testing/coverage.svg)](https://shepherd.dev/github/cycle/testing)
[![Codecov](https://img.shields.io/codecov/c/github/cycle/testing/1.x?style=flat-square&logo=codecov)](https://app.codecov.io/gh/cycle/testing/tree/1.x)
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat-square&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fcycle%2Ftesting%2F1.x)](https://dashboard.stryker-mutator.io/reports/github.com/cycle/testing/1.x)

</div>

Expand Down
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,18 @@
"db:up": "docker compose -f resources/docker/compose.yaml up -d --wait",
"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 @@ -107,5 +119,9 @@
"test:sqlite": "testo --suite=Feature/SQLite --suite=Acceptance/SQLite --suite=Regression/SQLite",
"test:sqlserver": "testo --suite=Feature/SQLServer --suite=Acceptance/SQLServer --suite=Regression/SQLServer",
"test:unit": "testo --suite=Unit"
},
"scripts-descriptions": {
"infect": "Run mutation testing with Infection against the Unit and SQLite suites",
"infect:ci": "Run mutation testing in CI: GitHub annotations, the Stryker dashboard report and the MSI gate"
}
}
18 changes: 18 additions & 0 deletions infection.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "vendor-bin/infection/vendor/infection/infection/resources/schema.json",
"source": {
"directories": [
"src"
]
},
"timeout": 10,
"minMsi": 54,
"minCoveredMsi": 54,
"testFramework": "testo",
"tmpDir": "runtime",
"logs": {
"stryker": {
"report": "1.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",
"testo/bridge-infection": "^0.1.9"
},
"config": {
"allow-plugins": {
"infection/extension-installer": true
}
}
}
Loading