@@ -53,6 +53,14 @@ inputs:
5353 description : ' Comma-separated list of specific test file paths to include (e.g., source/pkg/test/test_a.py,source/pkg/test/test_b.py)'
5454 default : ' '
5555 required : false
56+ test-node-ids-file :
57+ description : ' TOML file containing exact pytest node IDs to run'
58+ default : ' '
59+ required : false
60+ test-node-ids-key :
61+ description : ' Top-level key in test-node-ids-file containing the node IDs for this job'
62+ default : ' '
63+ required : false
5664 shard-index :
5765 description : ' Zero-based index of this shard (used with shard-count to split tests across parallel jobs)'
5866 default : ' '
93101 local shard_count="${13}"
94102 local volume_mount_source="${14}"
95103 local extra_pip_packages="${15}"
104+ local test_node_ids_file="${16}"
105+ local test_node_ids_key="${17}"
96106 local logs_pid=""
97107 local wait_pid=""
98108 local docker_wait_file="/tmp/.docker_exit_${container_name}"
@@ -130,10 +140,25 @@ runs:
130140 if [ -n "$include_files" ]; then
131141 echo "Include files: $include_files"
132142 fi
143+ if [ -n "$test_node_ids_file" ]; then
144+ echo "Test node IDs file: $test_node_ids_file"
145+ fi
146+ if [ -n "$test_node_ids_key" ]; then
147+ echo "Test node IDs key: $test_node_ids_key"
148+ fi
133149 if [ -n "$shard_index" ] && [ -n "$shard_count" ]; then
134150 echo "Shard: $shard_index of $shard_count"
135151 fi
136152
153+ if [ -n "$test_node_ids_file" ] || [ -n "$test_node_ids_key" ]; then
154+ if [ -z "$test_node_ids_file" ] || [ -z "$test_node_ids_key" ]; then
155+ echo "Both test-node-ids-file and test-node-ids-key must be set together"
156+ return 1
157+ fi
158+ export TEST_NODE_IDS_FILE="$test_node_ids_file"
159+ export TEST_NODE_IDS_KEY="$test_node_ids_key"
160+ fi
161+
137162 # Create reports directory
138163 mkdir -p "$reports_dir"
139164
@@ -170,6 +195,16 @@ runs:
170195 echo "Setting TEST_INCLUDE_FILES=$include_files_compact"
171196 fi
172197
198+ if [ -n "${TEST_NODE_IDS:-}" ]; then
199+ docker_env_vars="$docker_env_vars -e TEST_NODE_IDS"
200+ echo "Setting TEST_NODE_IDS"
201+ fi
202+
203+ if [ -n "${TEST_NODE_IDS_FILE:-}" ]; then
204+ docker_env_vars="$docker_env_vars -e TEST_NODE_IDS_FILE -e TEST_NODE_IDS_KEY"
205+ echo "Setting TEST_NODE_IDS_FILE=$TEST_NODE_IDS_FILE TEST_NODE_IDS_KEY=$TEST_NODE_IDS_KEY"
206+ fi
207+
173208 if [ -n "$shard_index" ] && [ -n "$shard_count" ]; then
174209 docker_env_vars="$docker_env_vars -e TEST_SHARD_INDEX=$shard_index -e TEST_SHARD_COUNT=$shard_count"
175210 echo "Setting TEST_SHARD_INDEX=$shard_index TEST_SHARD_COUNT=$shard_count"
@@ -392,7 +427,7 @@ runs:
392427 }
393428
394429 # Call the function with provided parameters
395- run_tests "${{ inputs.test-path }}" "${{ inputs.result-file }}" "${{ inputs.container-name }}" "${{ inputs.image-tag }}" "${{ inputs.reports-dir }}" "${{ inputs.pytest-options }}" "${{ inputs.filter-pattern }}" "${{ inputs.exclude-pattern }}" "${{ inputs.curobo-only }}" "${{ inputs.include-files }}" "${{ inputs.quarantined-only }}" "${{ inputs.shard-index }}" "${{ inputs.shard-count }}" "${{ inputs.volume-mount-source }}" "${{ inputs.extra-pip-packages }}"
430+ run_tests "${{ inputs.test-path }}" "${{ inputs.result-file }}" "${{ inputs.container-name }}" "${{ inputs.image-tag }}" "${{ inputs.reports-dir }}" "${{ inputs.pytest-options }}" "${{ inputs.filter-pattern }}" "${{ inputs.exclude-pattern }}" "${{ inputs.curobo-only }}" "${{ inputs.include-files }}" "${{ inputs.quarantined-only }}" "${{ inputs.shard-index }}" "${{ inputs.shard-count }}" "${{ inputs.volume-mount-source }}" "${{ inputs.extra-pip-packages }}" "${{ inputs.test-node-ids-file }}" "${{ inputs.test-node-ids-key }}"
396431
397432 - name : Kill container on cancellation
398433 if : cancelled()
0 commit comments