Skip to content

Commit bea5df2

Browse files
Add infection testing to pipeline
1 parent 9fa7f28 commit bea5df2

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

.github/workflows/main.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,7 @@ jobs:
5151
run: composer update --working-dir ${{ env.INSTALL_PATH }}
5252

5353
- name: Run unit tests
54-
run: composer test --working-dir ${{ env.INSTALL_PATH }}
54+
run: composer test --working-dir ${{ env.INSTALL_PATH }}
55+
56+
- name: Run mutation tests
57+
run: composer infect --working-dir ${{ env.INSTALL_PATH }}

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"ext-ctype": "*"
4040
},
4141
"require-dev": {
42-
"phpunit/phpunit": "~9.0"
42+
"phpunit/phpunit": "~9.0",
43+
"infection/infection": "^0.25.5"
4344
},
4445
"autoload": {
4546
"psr-4": {
@@ -52,7 +53,8 @@
5253
}
5354
},
5455
"scripts": {
55-
"test": "phpunit tests/"
56+
"test": "phpunit tests/",
57+
"infect": "XDEBUG_MODE=coverage infection --threads=2"
5658
},
5759
"minimum-stability": "stable",
5860
"prefer-stable": true

infection.json

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

0 commit comments

Comments
 (0)