@@ -213,3 +213,64 @@ jobs:
213213
214214 - name : " PHPStan"
215215 run : " make phpstan"
216+
217+ mutation-testing :
218+ name : " Mutation Testing"
219+ runs-on : " ubuntu-latest"
220+ needs : ["tests", "static-analysis"]
221+
222+ strategy :
223+ fail-fast : false
224+ matrix :
225+ php-version :
226+ - " 8.2"
227+ - " 8.3"
228+ - " 8.4"
229+ operating-system : [ubuntu-latest]
230+
231+ steps :
232+ - name : " Checkout"
233+ uses : actions/checkout@v5
234+
235+ - name : " Install PHP"
236+ uses : " shivammathur/setup-php@v2"
237+ with :
238+ coverage : " pcov"
239+ php-version : " ${{ matrix.php-version }}"
240+ tools : pecl, infection:0.31.7
241+ extensions : mbstring
242+ ini-file : development
243+ ini-values : memory_limit=-1
244+
245+ - name : " Install dependencies"
246+ run : " composer install --no-interaction --no-progress"
247+
248+ - name : " Checkout build-infection"
249+ uses : actions/checkout@v5
250+ with :
251+ repository : " phpstan/build-infection"
252+ path : " build-infection"
253+ ref : " 1.x"
254+
255+ - name : " Install build-infection dependencies"
256+ working-directory : " build-infection"
257+ run : " composer install --no-interaction --no-progress"
258+
259+ - name : " Configure infection"
260+ run : |
261+ php build-infection/bin/infection-config.php \
262+ > infection.json5
263+ cat infection.json5 | jq
264+
265+ - name : " Run infection"
266+ run : |
267+ git fetch --depth=1 origin $GITHUB_BASE_REF
268+ infection \
269+ --git-diff-base=origin/$GITHUB_BASE_REF \
270+ --git-diff-lines \
271+ --ignore-msi-with-no-mutations \
272+ --min-msi=100 \
273+ --min-covered-msi=100 \
274+ --log-verbosity=all \
275+ --debug \
276+ --logger-text=php://stdout
0 commit comments