Skip to content

Commit 5175bec

Browse files
committed
Add mutation testing with Infection
1 parent b46ed9d commit 5175bec

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,22 @@ jobs:
203203
- name: Run phpstan
204204
run: vendor/bin/phpstan
205205

206+
mutation-testing:
207+
runs-on: ubuntu-latest
208+
steps:
209+
- name: Setup PHP
210+
uses: shivammathur/setup-php@v2
211+
with:
212+
php-version: 8.4
213+
extensions: intl, sodium, zip
214+
tools: infection
215+
env:
216+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
217+
- uses: actions/checkout@v6
218+
- uses: ramsey/composer-install@v3
219+
- name: Run infection
220+
run: sudo infection --min-msi=68 --min-covered-msi=68 --threads=4 --show-mutations=max --no-progress
221+
206222
build-assets:
207223
needs:
208224
- unit-tests

infection.json5

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://raw.githubusercontent.com/infection/infection/0.32.6/resources/schema.json",
3+
"source": {
4+
"directories": [
5+
"src"
6+
]
7+
},
8+
"mutators": {
9+
"@default": true
10+
}
11+
}

0 commit comments

Comments
 (0)