[CI] CI: add extended test workflow - #4458
Conversation
🏷️ CI GuideRuns automatically on every PR:
Extended tests (opt-in via labels):
|
bfe1501 to
21220b7
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new GitHub Actions workflow to optionally trigger and gate PRs on an external “extended test” run, based on PR title or an explicit label, and then wait for a specific commit status context to report success/failure.
Changes:
- Introduces
.github/workflows/extended-test.yamlusingpull_request_targetwith same-repo-only gating. - Builds and sends a
repository_dispatchpayload (PR metadata + source run info) to a configured target repository. - Polls the commit status context
extended-tests/aiteruntil success/failure or a timeout.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| "source_workflow_run_id": os.environ["GITHUB_RUN_ID"], | ||
| "source_workflow_run_attempt": os.environ["GITHUB_RUN_ATTEMPT"], | ||
| "triggering_actor": os.environ["GITHUB_TRIGGERING_ACTOR"], |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
.github/workflows/extended-test.yaml:7
- To match the repository’s existing
pull_request_targetworkflows and avoid dispatching extended tests for PRs targeting non-mainbranches, add abranches: [main]filter underpull_request_target(see.github/workflows/pr-title-tags.yamlandpr-welcome-comment.yaml).
on:
pull_request_target:
types: [opened, synchronize, reopened, ready_for_review, edited, labeled]
.github/workflows/extended-test.yaml:67
GITHUB_TRIGGERING_ACTORis not guaranteed to be present in the runner environment for this event; using it withos.environ[...]can raiseKeyErrorand fail the workflow. Prefer a safe fallback toGITHUB_ACTOR(always set) to keep dispatch payload generation reliable.
"triggering_actor": os.environ["GITHUB_TRIGGERING_ACTOR"],
There was a problem hiding this comment.
Thanks, this looks good overall. I noticed two small things we may want to adjust:
- The workflow currently includes the architecture name in the public title-matching condition. Could we make the test label-only and remove those title checks?
- Since
editedis included in the event types, changing the PR title or description while the label is present can restart the test. Could we removeedited, since the label and new commits already provide the triggers we need?
There was a problem hiding this comment.
🔵 Needs a closer look
The new workflow has branch/draft scoping and a paginated-status polling issue that can cause unintended runs or timeouts.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
.github/workflows/extended-test.yaml:8
pull_request_targettrigger is not scoped to the default branch. Otherpull_request_targetworkflows in this repo restrict tobranches: [main], which avoids running this secret-using workflow on PRs targeting release/feature branches unintentionally.
.github/workflows/extended-test.yaml:31- This workflow can dispatch extended tests for draft PRs (e.g., on
opened/synchronize) if the title matches. Most other PR-triggered CI workflows in this repo gate onpull_request.draft == false, andready_for_reviewis already included in the event types.
.github/workflows/extended-test.yaml:121 - The commit-statuses endpoint is paginated; fetching only the first 100 statuses can miss the desired context if there are many statuses on the commit (e.g., repeated CI runs). That can cause this workflow to wait until timeout even though the status exists.
- Files reviewed: 1/1 changed files
- Comments generated: 0 new
- Review effort level: Lite
No description provided.