Skip to content

Commit b91871e

Browse files
committed
autorun_on_ready
Signed-off-by: Huamin Li <[email protected]>
1 parent 12da70f commit b91871e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

buildkite/test-template-ci.j2

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
{% set hf_home_efs = "/mnt/efs/hf_cache" %}
1717
{% set hf_home_fsx = "/fsx/hf_cache" %}
1818
{% set list_file_diff = list_file_diff | split("|") %}
19+
{% set autorun_label = autorun_label | default("ready", true) %}
1920

2021
{# Intelligent test targeting: Detect when only test files changed and collect them #}
2122
{%- set tests_acc = namespace(only_tests=true, any=false, changed=[]) %}
@@ -534,6 +535,13 @@ steps:
534535

535536
{% if ns.blocked == 1 or (step.optional and nightly != "1") %}
536537
- block: "Run {{ step.label }}"
538+
{# If this step opts in, show the manual block on normal PRs WITHOUT the autorun label.
539+
When the PR has the label, this block is omitted; the dependent test auto-runs. #}
540+
{% if step.autorun_on_ready %}
541+
if: |
542+
build.pull_request.id != null &&
543+
!(build.pull_request.labels includes "{{ autorun_label }}")
544+
{% endif %}
537545
depends_on: image-build
538546
key: block-{{ step.label | replace(" ", "-") | lower | replace("(", "") | replace(")", "") | replace("%", "") | replace(",", "-") | replace("+", "-") }}
539547
{% endif %}

0 commit comments

Comments
 (0)