Skip to content

ci: reduce jobs#11840

Open
loks0n wants to merge 15 commits into1.9.xfrom
ci/combine-linter-job
Open

ci: reduce jobs#11840
loks0n wants to merge 15 commits into1.9.xfrom
ci/combine-linter-job

Conversation

@loks0n
Copy link
Copy Markdown
Member

@loks0n loks0n commented Apr 9, 2026

Summary

  • Combines Checks / Composer, Checks / Format, Checks / Analyze, Checks / Specs, and Checks / Locale into a single Lint job, sharing one checkout and one composer install
  • Renames composer lintcomposer format:check and updates AGENTS.md accordingly
  • Removes the OSV scanner action
  • Moves Trivy source scan into the Lint job; splits Build into Build / Development (dev image + artifact for tests) and Build / Production (production image + Trivy image scan), so the image scan targets the same target that ships
  • PHPStan and Pint now run on the same commit — the git checkout HEAD^2 workaround is removed since the base branch is always correctly formatted
  • Adds a e2e PHPUnit test suite to phpunit.xml covering General, Account, Avatars, Console, Health, Locale, Messaging, Project, Projects, ProjectWebhooks, Proxy, Storage, Teams, Tokens, Users, VCS, and Webhooks; the new Tests / E2E job runs this suite via paratest with nproc * 2 processes (I/O-bound workload) across the full database × mode matrix
  • The remaining e2e_service matrix retains only the heavier services: Databases, TablesDB, Functions, FunctionsSchedule, GraphQL, Realtime, Sites, Migrations

Test plan

  • Lint job passes (validate, audit, PHPStan, specs, locale, Pint, Trivy source scan)
  • Build / Production Trivy image scan runs against the production image
  • Tests / E2E runs across all database × mode combinations
  • e2e_service matrix still covers the remaining heavy services

🤖 Generated with Claude Code

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Apr 9, 2026

Greptile Summary

This PR reduces CI job count by merging five separate check jobs (Composer, Format, Analyze, Specs, Locale) into a single Lint job sharing one checkout and one composer install, removes the OSV scanner, and moves the Trivy source scan into Lint while keeping the image scan against the correctly-targeted production build. Lighter e2e services are extracted from the e2e_service matrix into a new parallel Tests / E2E job using paratest; the git checkout HEAD^2 workaround and the composer lint alias are cleaned up.

Confidence Score: 5/5

Safe to merge; only remaining finding is a P2 suggestion to add retry to the new Tests / E2E job.

All changes are CI infrastructure refactoring with no production code impact. The Scopes/ removal from phpunit.xml is safe — those files are abstract base classes and traits with no runnable test cases. The sole open finding (missing retry wrapper) is a reliability quality-of-life suggestion, not a correctness issue.

.github/workflows/ci.yml — new Tests / E2E job lacks retry handling present in all sibling jobs.

Vulnerabilities

No security concerns identified. The Trivy image scan correctly targets the production build artifact, and the source scan now runs on the merge-commit checkout without the previous HEAD^2 detach. The OSV dependency scanner removal reduces automated advisory coverage, but this is an intentional trade-off documented in the PR.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Consolidates lint/check jobs and splits e2e tests into a parallel e2e job and a heavier-service e2e_service matrix; build target is correctly production and Trivy image scan targets that artifact. New e2e job lacks the retry wrapper used by every other e2e job.
phpunit.xml Reorganises the e2e suite: removes Scopes/ (base classes / traits only — no runnable test cases) and heavy-service directories now covered by e2e_service; adds lighter services not previously in the suite.
composer.json Renames the lint script to format:check to match the Pint check command; AGENTS.md is updated accordingly.
AGENTS.md Updates command table to reflect composer lintcomposer format:check rename.

Reviews (8): Last reviewed commit: "ci: scan image tar directly with trivy i..." | Re-trigger Greptile

Comment thread composer.json
Comment thread .github/workflows/ci.yml
Comment thread .github/workflows/ci.yml Outdated
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

🔄 PHP-Retry Summary

Flaky tests detected across commits:

Commit da64ef6 - 3 flaky tests
Test Retries Total Time Details
UsageTest::testFunctionsStats 1 10.19s Logs
UsageTest::testPrepareSitesStats 1 7ms Logs
UsageTest::testEmbeddingsTextUsageDoesNotBreakProjectUsage 1 6ms Logs
Commit 43c902b - 1 flaky test
Test Retries Total Time Details
FunctionsScheduleTest::testCreateScheduledAtExecution 1 127.40s Logs
Commit 85354f1 - 1 flaky test
Test Retries Total Time Details
FunctionsScheduleTest::testCreateScheduledAtExecution 1 132.35s Logs

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

✨ Benchmark results

  • Requests per second: 1,744
  • Requests with 200 status code: 313,979
  • P99 latency: 0.109147068

⚡ Benchmark Comparison

Metric This PR Latest version
RPS 1,744 1,211
200 313,979 218,013
P99 0.109147068 0.169891259

@loks0n loks0n changed the title ci: combine composer, format, and analyze into single lint job ci: reduce jobs Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant