Skip to content

ci: run affected PR checks and full verification after merge - #1254

Open
ale18V wants to merge 13 commits into
mainfrom
ci/selective-pr-checks
Open

ale18V wants to merge 13 commits into
mainfrom
ci/selective-pr-checks

Conversation

@ale18V

@ale18V ale18V commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

What & why

PR updates currently run the full verification suite even when a change only affects one package. This PR selects affected jobs on PRs, while running the complete suite on pushes to `main` (the after-merge event). A stable completion check (`complete`) reports failure when any selected verification job fails.

Additionally, the deployment workflow (`publish-deploy`) is updated to run only after the post-merge verification suite succeeds on `main`.

Technical plan

  1. Classify PR changes by package and downstream dependencies, with unfamiliar paths selecting the full suite.
  2. Pass the selection flags to the reusable build and test workflows.
  3. Consolidate status reporting into a unified `complete` job for PR status checks.
  4. Chain `publish-deploy` via `workflow_run` on `verify` completion on `main`, ensuring broken after-merge commits do not publish or deploy.

Deviations from plan

Replaced the merge queue with post-merge verification on `push` to `main` and chained CD via `workflow_run`.

Todo

Require the `complete` and `format-check` status checks in repository branch protection settings for `main`.

@ale18V
ale18V marked this pull request as ready for review October 10, 2026 14:11
@ale18V
ale18V force-pushed the ci/selective-pr-checks branch from 4279373 to 50eeaf7 Compare October 20, 2026 11:16
@ale18V ale18V changed the title ci: run affected PR checks and full merge queue checks ci: run affected PR checks and full verification after merge Oct 20, 2026
@ale18V
ale18V force-pushed the ci/selective-pr-checks branch from 50eeaf7 to 555cc60 Compare October 20, 2026 11:22
@ale18V
ale18V force-pushed the ci/selective-pr-checks branch from 555cc60 to d14d357 Compare October 28, 2026 10:01
@ale18V
ale18V requested a review from JulienVig October 29, 2026 09:11

@JulienVig JulienVig left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the refactor, overall I think it looks good! I just want to make sure that random forks can't trigger the publishing CD and that publishing runs stays ordered if they run in parallel.

# When triggered by workflow_run, jobs only proceed if post-merge verification succeeded.
# The push condition allows release tags (v*) to publish immediately.
publish-npm:
if: github.event_name == 'push' || github.event.workflow_run.conclusion == 'success'

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think this job would get triggered by a fork PR with branch name main which would publish their code, we need to check that it's our repository too

push:
# Deployments on main are chained to the verify workflow so they run only
# after post-merge verification succeeds on main, preventing deployment of broken commits.
workflow_run:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we should set a concurrency group to ensure that this workflow only runs one at a time so that concurrent runs can't rollback versions (if an older run finishes after the latest one)

This branch has not been deployed

No deployments
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