@@ -145,6 +145,55 @@ jobs:
145145 - name : " Tests"
146146 run : " make tests"
147147
148+ mutation-testing :
149+ name : " Mutation Testing"
150+ runs-on : " ubuntu-latest"
151+ needs : ["tests", "static-analysis"]
152+
153+ strategy :
154+ fail-fast : false
155+ matrix :
156+ php-version :
157+ - " 8.2"
158+ - " 8.3"
159+ - " 8.4"
160+
161+ steps :
162+ - name : " Checkout"
163+ uses : actions/checkout@v5
164+
165+ - name : " Install PHP"
166+ uses : " shivammathur/setup-php@v2"
167+ with :
168+ coverage : " pcov"
169+ php-version : " ${{ matrix.php-version }}"
170+ ini-file : development
171+ extensions : pdo, mysqli, pgsql, pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb
172+ tools : infection:0.31.4
173+
174+ - name : " Allow installing on PHP 8.4"
175+ if : matrix.php-version == '8.4'
176+ run : " composer config platform.php 8.3.99"
177+
178+ - name : " Install dependencies"
179+ run : " composer install --no-interaction --no-progress"
180+
181+ - uses : " actions/download-artifact@v4"
182+ with :
183+ name : " result-cache-${{ matrix.php-version }}"
184+ path : " tmp/"
185+
186+ - name : " Run infection"
187+ run : |
188+ git fetch --depth=1 origin $GITHUB_BASE_REF
189+ infection --git-diff-base=origin/$GITHUB_BASE_REF --git-diff-lines --ignore-msi-with-no-mutations --min-msi=100 --min-covered-msi=100 --log-verbosity=all --debug
190+
191+ - uses : " actions/upload-artifact@v4"
192+ if : always()
193+ with :
194+ name : " infection-log-${{ matrix.php-version }}"
195+ path : " tmp/infection.log"
196+
148197 static-analysis :
149198 name : " PHPStan"
150199 runs-on : " ubuntu-latest"
@@ -189,3 +238,9 @@ jobs:
189238
190239 - name : " PHPStan"
191240 run : " make phpstan"
241+
242+ - uses : " actions/upload-artifact@v4"
243+ with :
244+ # "update-packages" is not relevant for the download-artifact counterpart, but we need it here to get unique artifact names across all jobs
245+ name : " result-cache-${{ matrix.php-version }}${{ matrix.update-packages && '-packages-updated' || '' }}"
246+ path : " tmp/resultCache.php"
0 commit comments