Split the CI workflow into static analysis and tests
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
調査の方向性
.github/workflows/php.yml を最初から最後まで読み、マトリクス、Memcached/Redis のサービスブロック、キャッシュステップ、そして PHP-CS-Fixer、PHPStan、Rector、テスト、カバレッジの各ステップの順序をメモしてください。単一のジョブを、static-analysis ジョブ(PHP 8.2、サービスなし、composer validate --strict と3つのツール)と、tests ジョブに分割します。tests ジョブは 8.2/8.3/8.4 のマトリクス、サービス、テスト、8.2 に限定したカバレッジのアップロードを維持します。また、Composer のキャッシュを PHP バージョンごとに composer.json をキーとするように変更し、actions/checkout と actions/cache を Node.js 24 対応のバージョンに移行します。トリガーとテストフラグは変更しません。完了条件は、両方のジョブがプルリクエストに表示されて成功すること、静的解析が一度だけ実行されること、カバレッジのアップロードが一度だけ行われることです。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- PHP
- スター
- 44
- フォーク
- 22
- 平均マージ
- 2時間 57分
- マージ済み PR(30日)
- 52
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
quantum-php/framework のほかの issue
-
routing testing
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
quantum-php/framework#547 ·
メンテナーはふだん 1 日以内に返信
-
breaking change enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
quantum-php/framework#715 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
quantum-php/framework#714 ·
メンテナーはふだん 1 日以内に返信
-
refactoring tech debt
難易度 4/5 3〜5日 初心者へのやさしさ 68/100
quantum-php/framework#712 ·
メンテナーはふだん 1 日以内に返信
-
refactoring tech debt
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
quantum-php/framework#693 ·
メンテナーはふだん 1 日以内に返信
quantum-php/framework の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ExpressionEngine/ExpressionEngine#5493 ·
メンテナーはふだん 5 日以内に返信
-
"Attempt to read property 'username' on null" error after a user is deleted対応中かも @dicksonlaw583 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
omeka/plugin-SimplePages#49 ·
-
not confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
enhancement good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信