Skip to content

Commit 8fe637e

Browse files
authored
Utilize build-infection
Thank you! Now we can do it on more repos :)
1 parent 31a924b commit 8fe637e

File tree

4 files changed

+28
-97
lines changed

4 files changed

+28
-97
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ on:
88
branches:
99
- "2.0.x"
1010

11+
concurrency:
12+
group: build-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
13+
cancel-in-progress: true
14+
1115
jobs:
1216
lint:
1317
name: "Lint"
@@ -169,7 +173,7 @@ jobs:
169173
php-version: "${{ matrix.php-version }}"
170174
ini-file: development
171175
extensions: pdo, mysqli, pgsql, pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb
172-
tools: infection:0.31.6
176+
tools: infection:0.31.7
173177

174178
- name: "Allow installing on PHP 8.4"
175179
if: matrix.php-version == '8.4'
@@ -178,10 +182,30 @@ jobs:
178182
- name: "Install dependencies"
179183
run: "composer install --no-interaction --no-progress"
180184

181-
- uses: "actions/download-artifact@v4"
185+
- name: "Checkout build-infection"
186+
uses: actions/checkout@v5
187+
with:
188+
repository: "phpstan/build-infection"
189+
path: "build-infection"
190+
ref: "1.x"
191+
192+
- name: "Install build-infection dependencies"
193+
working-directory: "build-infection"
194+
run: "composer install --no-interaction --no-progress"
195+
196+
- name: "Configure infection"
197+
run: |
198+
php build-infection/bin/infection-config.php \
199+
> infection.json5
200+
cat infection.json5 | jq
201+
202+
- name: "Cache Result cache"
203+
uses: actions/cache@v4
182204
with:
183-
name: "result-cache-${{ matrix.php-version }}"
184-
path: "tmp/"
205+
path: ./tmp
206+
key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"
207+
restore-keys: |
208+
result-cache-v1-${{ matrix.php-version }}-
185209
186210
- name: "Run infection"
187211
run: |
@@ -240,9 +264,3 @@ jobs:
240264

241265
- name: "PHPStan"
242266
run: "make phpstan"
243-
244-
- uses: "actions/upload-artifact@v4"
245-
with:
246-
# "update-packages" is not relevant for the download-artifact counterpart, but we need it here to get unique artifact names across all jobs
247-
name: "result-cache-${{ matrix.php-version }}${{ matrix.update-packages && '-packages-updated' || '' }}"
248-
path: "tmp/resultCache.php"

infection.json5

Lines changed: 0 additions & 17 deletions
This file was deleted.

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ parameters:
2525
- tests/*/data-attributes/*
2626
- tests/*/data-php-*/*
2727
- tests/Rules/Doctrine/ORM/entity-manager.php
28-
- tests/Infection/
2928

3029
reportUnmatchedIgnoredErrors: false
3130

tests/Infection/TrinaryLogicMutator.php

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)