@@ -135,6 +135,60 @@ jobs:
135135 - name : 🧪 Run tests that require separate process using phpunit/phpunit
136136 run : composer test:sep
137137
138+
139+ mutation-testing :
140+ timeout-minutes : 16
141+ runs-on : ${{ matrix.os }}
142+ concurrency :
143+ cancel-in-progress : true
144+ group : mutation-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
145+ strategy :
146+ fail-fast : true
147+ matrix :
148+ os :
149+ - ubuntu-latest
150+ php-version :
151+ - ' 8.2'
152+ dependencies :
153+ - locked
154+ steps :
155+ - name : 📦 Check out the codebase
156+ uses : actions/checkout@v4.1.6
157+
158+ - name : 🛠️ Setup PHP
159+ uses : shivammathur/setup-php@2.30.4
160+ with :
161+ php-version : ${{ matrix.php-version }}
162+ extensions : mbstring, pdo, pdo_sqlite
163+ ini-values : error_reporting=E_ALL
164+ coverage : xdebug
165+
166+ - name : 🛠️ Setup problem matchers
167+ run : echo "::add-matcher::${{ runner.tool_cache }}/php.json"
168+
169+ - name : 🤖 Validate composer.json and composer.lock
170+ run : composer validate --ansi --strict
171+
172+ - name : 🔍 Get composer cache directory
173+ uses : wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
174+
175+ - name : ♻️ Restore cached dependencies installed with composer
176+ uses : actions/cache@v4.0.2
177+ with :
178+ path : ${{ env.COMPOSER_CACHE_DIR }}
179+ key : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
180+ restore-keys : php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
181+
182+ - name : 📥 Install "${{ matrix.dependencies }}" dependencies with composer
183+ uses : wayofdev/gh-actions/actions/composer/install@v3.1.0
184+ with :
185+ dependencies : ${{ matrix.dependencies }}
186+
187+ - name : 🧪 Run mutation testing using Xdebug and infection/infection
188+ run : composer infect:ci
189+ env :
190+ STRYKER_DASHBOARD_API_KEY : ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
191+
138192 compile-phar :
139193 timeout-minutes : 4
140194 runs-on : ${{ matrix.os }}
0 commit comments