Split the CI workflow into static analysis and tests
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 72/100
Rechercherichtung
Lies .github/workflows/php.yml von Anfang bis Ende und notiere die Matrix, die Memcached/Redis-Service-Blöcke, den Cache-Schritt sowie die Reihenfolge der Schritte PHP-CS-Fixer, PHPStan, Rector, Tests und Coverage. Teile den einzelnen Job auf in einen Job static-analysis (PHP 8.2, ohne Services, composer validate --strict plus die drei Tools) und einen Job tests, der die Matrix 8.2/8.3/8.4, die Services, die Tests und den auf 8.2 beschränkten Coverage-Upload beibehält. Schlüssele außerdem den Composer-Cache pro PHP-Version auf composer.json und stelle actions/checkout und actions/cache auf ihre Node.js-24-Versionen um; Trigger und Testflags bleiben unverändert. Fertig ist, wenn beide Jobs in einem Pull Request erscheinen und bestehen, die statische Analyse genau einmal läuft und der Coverage-Upload genau einmal erfolgt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Summary
.github/workflows/php.yml runs one job for each PHP version (8.2, 8.3 and 8.4), and each job runs everything in a row: it starts Memcached and Redis, installs the dependencies, runs PHP-CS-Fixer, PHPStan and Rector, runs the tests and uploads the coverage. Split it into a static analysis job that runs once and a test job that runs for each PHP version.
Problems
- Static analysis runs three times with the same result. PHP-CS-Fixer, PHPStan and Rector check the source, not the runtime: PHPStan analyses it as PHP 8.2 (
phpVersion: 80200) and Rector uses the PHP 8.2 level set, whatever PHP runs them. PHPStan is the slowest of them. - A style or analysis failure hides the test result. The steps run in order, so a PHP-CS-Fixer finding stops the job before the tests run.
- The coverage is uploaded three times, once per PHP version.
- The static checks start Memcached and Redis, which they do not use.
- The Composer cache is keyed on
composer.lock, which the repository does not track, so all PHP versions share one cache key. actions/checkout@v4andactions/cache@v4run on Node.js 20, which GitHub is retiring on its runners.
Change
Two jobs in php.yml, which run in parallel:
static-analysis: once, on PHP 8.2, without services:composer validate --strict, PHP-CS-Fixer, PHPStan, Rector.tests: the matrix PHP 8.2, 8.3 and 8.4 with Memcached and Redis: the tests, and the coverage upload from PHP 8.2 only.
Also: a Composer cache key per PHP version based on composer.json, and the Node.js 24 versions of actions/checkout and actions/cache.
The triggers (push to master and *.x, every pull_request) and the test flags (--fail-on-warning --fail-on-risky) stay as they are. Branch protection requires only the Scrutinizer check, so the new job names need no change there.
The change applies from 3.3.0 on, on master; the release lines keep their current workflow.
Out of scope
- Other PHP versions or operating systems in the matrix.
- Vorherrschende Sprache
- PHP
- Sterne
- 44
- Forks
- 22
- Ø Merge
- 2 Std. 57 Min.
- Gemergte PRs (30 T.)
- 52
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Keine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus quantum-php/framework
-
routing testing
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
quantum-php/framework#547 ·
Maintainer antworten meist innerhalb von 1 Tag
-
breaking change enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
quantum-php/framework#715 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 45/100
quantum-php/framework#714 ·
Maintainer antworten meist innerhalb von 1 Tag
-
refactoring tech debt
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 68/100
quantum-php/framework#712 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Raise PHPStan to level 9Offenrefactoring tech debt
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
quantum-php/framework#693 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in quantum-php/framework
Ähnliche Issues
-
OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Maintainer antworten meist innerhalb von 5 Tagen
-
"Attempt to read property 'username' on null" error after a user is deletedEvtl. vergeben @dicksonlaw583 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
omeka/plugin-SimplePages#49 ·
-
not confirmed
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement good first issue
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 86/100
Maintainer antworten meist innerhalb von 1 Tag