-
Notifications
You must be signed in to change notification settings - Fork 112
Utilize build-infection #699
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 24 commits
cc9f05e
6e9daf1
747ec2d
9c591dd
f4be5fe
9cc6c77
b31655d
95851bd
d4edda1
0645768
971df8b
72d9520
7c87507
1ce7e3b
f55a990
0265944
4d596fe
998db4f
da0569a
ef9a60a
e686def
6dccbc4
dd9d5bc
cf4eb88
7491018
8da5e2f
5193dc7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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" | ||
|
|
@@ -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' | ||
|
|
@@ -178,10 +182,27 @@ 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: | ||
| name: "result-cache-${{ matrix.php-version }}" | ||
| path: "tmp/" | ||
| 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 mutators" | ||
| run: cp build-infection/resources/infection.json5 . | ||
|
|
||
| - name: "Cache Result cache" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ./tmp | ||
| key: "result-cache-v14-${{ matrix.php-version }}-${{ github.run_id }}" | ||
staabm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| restore-keys: | | ||
| result-cache-v14-${{ matrix.php-version }}- | ||
|
|
||
| - name: "Run infection" | ||
| run: | | ||
|
|
@@ -240,9 +261,3 @@ jobs: | |
|
|
||
| - name: "PHPStan" | ||
| run: "make phpstan" | ||
|
|
||
| - uses: "actions/upload-artifact@v4" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. instead of uploading/downloading artifacts for caching, I changed to use |
||
| 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" | ||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, here we take the config 1:1 from build-infection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just FYI in phpstan-src I'll also want to add https://github.com/phpstan/phpstan-src/tree/2.1.x/build/PHPStan/Build because there are some tests for that in https://github.com/phpstan/phpstan-src/tree/2.1.x/tests/PHPStan/Build.
So if we're copying the whole config I'd still like to be able to modify it afterward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a
--source-directory='another/path'optionUh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hmm I think whether it would make sense to move this
phpstan-src/build/PHPStan/Buildrules into a separate repo, as this might make sense to be re-used in 1st party extension repos?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They're not relevant like that yet, mostly because phpstan-src can use PHP 8+ features thanks to downgrading and the extensions can't.