Skip to content

Commit c5fa738

Browse files
committed
Infection on build-infection
1 parent 0af5b5a commit c5fa738

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/build.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,52 @@ jobs:
147147

148148
- name: "PHPStan"
149149
run: "make phpstan"
150+
151+
mutation-tests:
152+
name: "Mutation tests"
153+
runs-on: "ubuntu-latest"
154+
needs:
155+
- tests
156+
- static-analysis
157+
158+
strategy:
159+
fail-fast: false
160+
matrix:
161+
php-version:
162+
- "8.2"
163+
- "8.3"
164+
- "8.4"
165+
166+
steps:
167+
- name: "Checkout"
168+
uses: actions/checkout@v5
169+
170+
- uses: ./.github/actions/setup-php
171+
with:
172+
php-version: "${{ matrix.php-version }}"
173+
174+
- name: "Install dependencies"
175+
run: "composer install --no-interaction --no-progress"
176+
177+
- name: "Restore result cache"
178+
uses: actions/cache/restore@v4
179+
with:
180+
path: ./tmp
181+
key: "repo-result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"
182+
restore-keys: |
183+
repo-result-cache-v1-${{ matrix.php-version }}-
184+
185+
- name: "Run infection"
186+
run: |
187+
infection \
188+
--ignore-msi-with-no-mutations \
189+
--log-verbosity=all \
190+
--debug \
191+
--logger-text=php://stdout
192+
193+
- name: "Save result cache"
194+
uses: actions/cache/save@v4
195+
if: ${{ !cancelled() }}
196+
with:
197+
path: ./tmp
198+
key: "repo-result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"

infection.json5

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"$schema": "vendor/infection/infection/resources/schema.json",
3+
"timeout": 30,
4+
"source": {
5+
"directories": [
6+
"src"
7+
]
8+
},
9+
"staticAnalysisTool": "phpstan",
10+
"logs": {
11+
"text": "tmp/infection.log"
12+
}
13+
}

0 commit comments

Comments
 (0)