Skip to content

ci: consolidate quality gates into single workflow - #351

Merged
loadinglucian merged 5 commits into
mainfrom
ci/consolidate-quality-gates
Feb 22, 2026
Merged

ci: consolidate quality gates into single workflow#351
loadinglucian merged 5 commits into
mainfrom
ci/consolidate-quality-gates

Conversation

@loadinglucian

Copy link
Copy Markdown
Owner

Summary

  • Merge pest, phpstan, pint, rector, and ci-canary into a single quality-gates.yml with sequential needs: job dependencies (ci-canarypintphpstanrectorpest)
  • Remove the manual github-script quality-gate aggregation job from bats-vm-ubuntu24.yml — it now triggers off a single workflow_run: ["Quality Gates"] signal
  • Simplify fork guard in bats-cloud-janitor.yml

Test plan

  • Verify Quality Gates workflow runs on PR and all jobs pass in sequence
  • Verify bats-vm-ubuntu24 triggers after Quality Gates completes successfully
  • Confirm no orphaned workflow runs from deleted files

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.
@coderabbitai

coderabbitai Bot commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

Note

Reviews paused

It 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 reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

The 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 .github/workflows/ci.yml file replaces these with orchestrated conditional execution. Action versions are pinned to specific commits.

Changes

Cohort / File(s) Summary
Removed Individual Workflows
\.github/workflows/bats-cloud-janitor.yml, \.github/workflows/bats-vm-ubuntu24.yml, \.github/workflows/ci-canary.yml, \.github/workflows/pest.yml, \.github/workflows/phpstan.yml, \.github/workflows/pint.yml, \.github/workflows/rector.yml, \.github/workflows/bats-cloud-aws.yml, \.github/workflows/bats-cloud-do.yml
Removed nine separate workflow files totaling 746 deleted lines: code quality gate workflows (Pint, PHPStan, Rector, CI Canary), test execution (Pest), VM testing, cloud testing (AWS/DigitalOcean), and cloud resource cleanup.
New Consolidated CI Workflow
\.github/workflows/ci.yml
Added 562-line comprehensive CI workflow consolidating quality gates, VM tests, cloud tests (AWS/DO providers), and janitor operations with trust-context classification, conditional execution chains, and multi-parameter dispatch inputs.
Action Version Pinning
\.github/actions/setup-php-composer/action.yml
Pinned action references to specific commit SHAs: Setup PHP to shivammathur/setup-php@44454db4f0199b8b9685a5d763dc37cbf79108e1 and Composer Install to ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: consolidating quality gates into a single workflow, which aligns with the primary objective of merging multiple workflow files.
Description check ✅ Passed The description is clearly related to the changeset, detailing the consolidation of workflows, removal of quality-gate aggregation jobs, and simplification of fork guards.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/quality-gates.yml Outdated
Lucian Behind The Scenes added 3 commits February 22, 2026 12:17
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/.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread .github/workflows/ci.yml
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.
@loadinglucian
loadinglucian merged commit babef27 into main Feb 22, 2026
13 checks passed
@loadinglucian
loadinglucian deleted the ci/consolidate-quality-gates branch February 22, 2026 11:16
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.

2 participants