Chore: Consolidate CI workflows and harden test infra#241
Conversation
Merge test/lint/bench workflows into a single ci.yml, add PHPStan to CI, parallelize adapter tests via matrix, replace fixed sleeps with compose healthchecks, pin composer image to 2.7, and bump checkout to v4. Also move ext-swoole to suggest so FPM-only consumers can install without --ignore-platform-reqs, and simplify phpunit.xml discovery. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Greptile SummaryThis PR consolidates three separate workflow files into a single The infrastructure changes are well-structured, but two action version references in
Confidence Score: 4/5Safe to merge once the two action version tags in ci.yml are confirmed or corrected — currently all CI jobs would fail if @v6/@v7 don't resolve. Two P1 findings in ci.yml (checkout@v6 and upload-artifact@v7) could silently break every job in the new pipeline. Everything else — healthchecks, composer changes, Dockerfile updates, phpunit.xml restructuring — is correct and well done. .github/workflows/ci.yml — verify actions/checkout and actions/upload-artifact version tags. Important Files Changed
Reviews (3): Last reviewed commit: "Bump k6 load to 60s, shorten PR comment,..." | Re-trigger Greptile |
Rename jobs per team convention: Lint -> Format, Static Analysis -> Analyze, Benchmarks -> Benchmark. Split the single Tests matrix into three jobs: Tests / Unit (runs on host PHP, no docker), Tests / E2E / FPM, and Tests / E2E / Swoole. Adds phpunit testsuites (unit, e2e-fpm, e2e-swoole) and moves BaseTest trait to tests/ so it autoloads via its existing PSR-4 namespace. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The CodeQL workflow did not actually run CodeQL — it ran PHPStan under a misleading name. Checks / Analyze already covers that.
Removes phpbench/phpbench (and its Symfony transitive deps) in favour of a k6 HTTP load test targeting the swoole adapter. The CI benchmark job runs k6 against the docker-compose swoole service, uploads the JSON + text summary as an artifact, and posts a sticky PR comment with the default k6 summary output.
k6 benchmark
|
| name: CI | ||
|
|
||
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master, "*.x"] |
There was a problem hiding this comment.
CodeQL security scanning silently removed
codeql-analysis.yml was deleted as part of this PR but is not mentioned in the description. The repository no longer has any automated security scanning for PHP source code. If this is intentional, the PR description should document the decision; if not, the file should be restored or replaced with an equivalent scanning step in ci.yml.
Also updates checkout, cache, upload-artifact, and sticky-comment actions to their latest major versions.
| name: Checks / Format | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 |
There was a problem hiding this comment.
actions/checkout version mismatch with PR description
The PR description says "Bump actions/checkout@v3 → @v4", but every uses: actions/checkout step in this file is pinned to @v6. If @v6 does not resolve in the GitHub Actions runner (e.g., it's ahead of what's been released), all five jobs will fail immediately on the checkout step. Verify the intended tag and update consistently.
Summary
test.yml+lint.yml+bench.ymlinto a singleci.ymlthat runs on bothpull_requestandpush(master +*.x), with four parallel jobs:lint,static,tests(matrix: fpm/swoole),bench.staticjob (runs on host PHP 8.2 withext-swoole, composer cache enabled).sleep 10readiness gate with real compose healthchecks anddocker compose up --wait.fail-fast: falsematrix; each job only brings up its own service.composer:2.0→composer:2.7across Dockerfiles and CI so local and CI use the same toolchain.actions/checkout@v3→@v4.ext-swoolefromrequiretosuggestso FPM-only consumers cancomposer installwithout--ignore-platform-reqs.composer.lockregenerated.phpunit.xml(drop the stray<file>entry)..gitignorehygiene (.vscode/,.phpunit.cache/,composer.phar, explicit.phpunit.result.cache).fpm depends_on: swoolecoupling indocker-compose.yml.Test plan
docker compose up -d --build --wait fpm swoole— both containers report Healthy locallydocker compose exec -T fpm vendor/bin/phpunit— 101/101 passingdocker compose exec -T swoole vendor/bin/phpunit— 101/101 passingvendor/bin/phpstan analyse -c phpstan.neon --memory-limit 512M— clean🤖 Generated with Claude Code