Split the CI workflow into static analysis and tests
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
Hướng nghiên cứu
Đọc .github/workflows/php.yml từ đầu đến cuối và ghi lại ma trận, các khối dịch vụ Memcached/Redis, bước cache, cũng như thứ tự các bước PHP-CS-Fixer, PHPStan, Rector, kiểm thử và coverage. Tách job duy nhất thành job static-analysis (PHP 8.2, không có dịch vụ, composer validate --strict cùng ba công cụ) và job tests giữ nguyên ma trận 8.2/8.3/8.4, các dịch vụ, bước kiểm thử và việc tải lên coverage chỉ chạy trên 8.2. Ngoài ra, khóa cache của Composer theo phiên bản PHP dựa trên composer.json, và chuyển actions/checkout cùng actions/cache sang phiên bản dùng Node.js 24; giữ nguyên trigger và các cờ kiểm thử. Hoàn thành khi cả hai job xuất hiện và vượt qua trên một pull request, phần phân tích tĩnh chỉ chạy một lần và việc tải lên coverage cũng chỉ diễn ra một lần.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- PHP
- Star
- 44
- Fork
- 22
- Merge trung bình
- 2 giờ 57 phút
- Pull request đã merge (30 ngày)
- 52
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của quantum-php/framework
-
routing testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
quantum-php/framework#547 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
breaking change enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
quantum-php/framework#715 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
quantum-php/framework#714 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
refactoring tech debt
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 68/100
quantum-php/framework#712 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Raise PHPStan to level 9Đang mởrefactoring tech debt
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
quantum-php/framework#693 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của quantum-php/framework
Issue tương tự
-
OCM: shares using the `embedded` protocol are rejected with "Missing sharedSecret in protocol"Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
ExpressionEngine/ExpressionEngine#5493 ·
Maintainer thường phản hồi trong vòng 5 ngày
-
"Attempt to read property 'username' on null" error after a user is deletedCó thể đã có người làm @dicksonlaw583 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
omeka/plugin-SimplePages#49 ·
-
Copy button does not workĐang mởnot confirmed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
Maintainer thường phản hồi trong vòng 1 ngày