Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 28 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
branches:
- "2.0.x"

concurrency:
group: build-${{ github.head_ref || github.run_id }} # will be canceled on subsequent pushes in pull requests but not branches
cancel-in-progress: true

jobs:
lint:
name: "Lint"
Expand Down Expand Up @@ -169,7 +173,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
ini-file: development
extensions: pdo, mysqli, pgsql, pdo_mysql, pdo_pgsql, pdo_sqlite, mongodb
tools: infection:0.31.6
tools: infection:0.31.7

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

- uses: "actions/download-artifact@v4"
- name: "Checkout build-infection"
uses: actions/checkout@v5
with:
repository: "phpstan/build-infection"
path: "build-infection"
ref: "1.x"

- name: "Install build-infection dependencies"
working-directory: "build-infection"
run: "composer install --no-interaction --no-progress"

- name: "Configure infection"
run: |
php build-infection/bin/infection-config.php \
> infection.json5
cat infection.json5 | jq

- name: "Cache Result cache"
uses: actions/cache@v4
with:
name: "result-cache-${{ matrix.php-version }}"
path: "tmp/"
path: ./tmp
key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}"
restore-keys: |
result-cache-v1-${{ matrix.php-version }}-

- name: "Run infection"
run: |
Expand Down Expand Up @@ -240,9 +264,3 @@ jobs:

- name: "PHPStan"
run: "make phpstan"

- uses: "actions/upload-artifact@v4"
Copy link
Contributor Author

@staabm staabm Oct 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

instead of uploading/downloading artifacts for caching, I changed to use actions/cache because that way it also works on phpstan-src. special in phpstan-src is that the "static-analysis" and "test" jobs are spread across 2 workflows, which makes artifact handling otherwise complicated

with:
# "update-packages" is not relevant for the download-artifact counterpart, but we need it here to get unique artifact names across all jobs
name: "result-cache-${{ matrix.php-version }}${{ matrix.update-packages && '-packages-updated' || '' }}"
path: "tmp/resultCache.php"
17 changes: 0 additions & 17 deletions infection.json5

This file was deleted.

1 change: 0 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ parameters:
- tests/*/data-attributes/*
- tests/*/data-php-*/*
- tests/Rules/Doctrine/ORM/entity-manager.php
- tests/Infection/

reportUnmatchedIgnoredErrors: false

Expand Down
69 changes: 0 additions & 69 deletions tests/Infection/TrinaryLogicMutator.php

This file was deleted.

Loading