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