ci: consolidate quality gates into single workflow - #351
Conversation
Merge pest, phpstan, pint, rector, and ci-canary into a single quality-gates.yml with sequential job dependencies. Downstream bats-vm-ubuntu24 now triggers off one workflow_run signal instead of aggregating five, removing the manual github-script quality gate job. Simplify bats-cloud-janitor fork guard accordingly.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughThe PR consolidates nine separate GitHub Actions workflow files into a single unified CI workflow. Removed files include individual workflows for code quality checks (Pint, PHPStan, Rector, CI Canary), testing (Pest), VM testing, and cloud testing across multiple providers (AWS, DigitalOcean), along with cloud resource cleanup automation. A new comprehensive Changes
Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/quality-gates.yml:
- Around line 45-77: In the ci-canary job add explicit checks that the required
binaries exist and are executable before running their tests: for
vendor/bin/pint, vendor/bin/rector and vendor/bin/phpstan (used in the "Verify
Pint fails on CICanary class", "Verify Rector fails on CICanary class" and
"Verify PHPStan fails on CICanary class" steps) fail the step immediately if the
binary is missing or not executable (e.g. use a test like checking file
existence/executable or command -v) so an exit code 127 cannot be mistaken for
an expected canary failure; do this check right before each corresponding run
block and print a clear error when the binary is missing.
Remove sequential needs: chain so pint, phpstan, rector, and pest all run concurrently instead of waiting on each other.
Replace separate quality-gates, bats-vm, bats-cloud-aws, bats-cloud-do, and bats-cloud-janitor workflows with consolidated ci.yml. Pin setup-php and composer-install actions to SHA hashes for supply-chain security. Add CODEOWNERS rule for .github/workflows/.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 181-250: The quality gate jobs (pint, phpstan, rector, pest)
currently only need trust-context so they run in parallel; change their needs to
chain them ci-canary → pint → phpstan → rector → pest by updating the needs
keys: set pint to need ci-canary (instead of trust-context), set phpstan to need
pint, set rector to need phpstan, and set pest to need rector (you can keep
trust-context as a transitive dependency on ci-canary if required); keep
existing if:, runs-on, steps and other settings unchanged so the jobs fail-fast
in sequence.
Use YAML anchors to share path filters between pull_request and push triggers. Centralize checkout_ref computation in trust-context so concurrency groups and checkout steps reference a single output instead of repeating the inline ternary. Drop unused intermediate outputs (is_pr, is_push_main, is_same_repo_pr, is_fork_pr). Revert redundant CODEOWNERS workflows rule.
Summary
pest,phpstan,pint,rector, andci-canaryinto a singlequality-gates.ymlwith sequentialneeds:job dependencies (ci-canary→pint→phpstan→rector→pest)github-scriptquality-gate aggregation job frombats-vm-ubuntu24.yml— it now triggers off a singleworkflow_run: ["Quality Gates"]signalbats-cloud-janitor.ymlTest plan
Quality Gatesworkflow runs on PR and all jobs pass in sequencebats-vm-ubuntu24triggers afterQuality Gatescompletes successfully