Skip to content

Commit deb3d9a

Browse files
committed
Add mutation testing configuration and steps to CI
1 parent 3b407aa commit deb3d9a

2 files changed

Lines changed: 35 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,20 @@ jobs:
8585
- run: vendor/bin/phpunit --coverage-clover=coverage.xml
8686
- uses: codecov/codecov-action@v5
8787
env:
88-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
88+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
89+
mutation-tests:
90+
name: Mutation Tests
91+
needs:
92+
- dependency-validation
93+
runs-on: ubuntu-latest
94+
timeout-minutes: 5
95+
steps:
96+
- uses: actions/checkout@v4
97+
- uses: shivammathur/setup-php@v2
98+
with:
99+
php-version: 8.4
100+
tools: infection
101+
- uses: ramsey/composer-install@v3
102+
- run: infection --min-msi=58 --min-covered-msi=69 --threads=4
103+
env:
104+
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

infection.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"source": {
3+
"directories": [
4+
"src"
5+
]
6+
},
7+
"timeout": 10,
8+
"logs": {
9+
"text": "coverage/infections.log",
10+
"html": "coverage/mutants.html",
11+
"stryker": {
12+
"badge": "master"
13+
}
14+
},
15+
"mutators": {
16+
"@default": true
17+
}
18+
}

0 commit comments

Comments
 (0)