2020 branches :
2121 - dev
2222 - main
23- - " pull-request/[0-9]+"
24- - " deploy-release/*"
23+ - ' pull-request/[0-9]+'
24+ - ' deploy-release/*'
2525 merge_group :
2626 types : [checks_requested]
2727 workflow_dispatch :
9797 with :
9898 issue-number : ${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number }}
9999 repository : ${{ github.repository }}
100- body-includes : " <!--external-contributor-comment-->"
100+ body-includes : ' <!--external-contributor-comment-->'
101101
102102 - name : Delete comment
103103 uses : actions/github-script@v7
@@ -200,6 +200,11 @@ jobs:
200200 && needs.pre-flight.outputs.is_merge_group == 'false'
201201 && !cancelled()
202202 steps :
203+ - name : Taint node for job isolation
204+ if : contains(needs.is-not-external-contributor.outputs.selected_runner, 'ephemeral')
205+ shell : bash
206+ run : taint-node.sh
207+
203208 - name : Checkout
204209 uses : actions/checkout@v4
205210
@@ -230,11 +235,9 @@ jobs:
230235
231236 - name : Download test data
232237 shell : bash
233- env :
234- GH_TOKEN : ${{ secrets.PAT }}
235238 run : |
236239 echo "::group::Download test data"
237- pip install --no-cache-dir pygithub click
240+ pip install --no-cache-dir click requests
238241 python tests/test_utils/python_scripts/download_unit_tests_dataset.py --assets-dir ./assets
239242 echo "::endgroup::"
240243
@@ -345,7 +348,7 @@ jobs:
345348 - cicd-container-build
346349 - cicd-parse-unit-tests
347350 runs-on : ${{ needs.is-not-external-contributor.outputs.selected_runner }}
348- name : " ${{ matrix.bucket }} - latest"
351+ name : ' ${{ matrix.bucket }} - latest'
349352 if : |
350353 (
351354 success()
@@ -359,6 +362,11 @@ jobs:
359362 PIP_NO_PYTHON_VERSION_WARNING : 1
360363 PIP_ROOT_USER_ACTION : ignore
361364 steps :
365+ - name : Taint node for job isolation
366+ if : contains(needs.is-not-external-contributor.outputs.selected_runner, 'ephemeral')
367+ shell : bash
368+ run : taint-node.sh
369+
362370 - name : Checkout
363371 uses : actions/checkout@v4
364372 - name : main
@@ -367,7 +375,7 @@ jobs:
367375 test_case : ${{ matrix.bucket }}
368376 tag : latest
369377 timeout : ${{ matrix.timeout || 30 }}
370- is_unit_test : " true"
378+ is_unit_test : ' true'
371379 PAT : ${{ secrets.PAT }}
372380 container-image : ${{ env.container-registry }}/megatron-lm:${{ github.sha }}
373381
@@ -406,10 +414,20 @@ jobs:
406414 HAS_RUN_TESTS_LABEL=$(gh pr view $PR_NUMBER --json labels | jq '[.labels[].name] | any(. == "Run tests")') || echo "false"
407415 echo "main=$HAS_RUN_TESTS_LABEL" | tee -a $GITHUB_OUTPUT
408416
417+ - name : Has Run functional tests label
418+ id : has-run-functional-tests-label
419+ env :
420+ GH_TOKEN : ${{ secrets.PAT }}
421+ run : |
422+ PR_NUMBER=${{ fromJSON(steps.get-pr-info.outputs.pr-info || '{}').number }}
423+ HAS_RUN_FUNCTIONAL_TESTS_LABEL=$(gh pr view $PR_NUMBER --json labels | jq '[.labels[].name] | any(. == "Run functional tests")') || echo "false"
424+ echo "main=$HAS_RUN_FUNCTIONAL_TESTS_LABEL" | tee -a $GITHUB_OUTPUT
425+
409426 - name : Parse functional tests
410427 id : main
411428 env :
412429 HAS_RUN_TESTS_LABEL : ${{ steps.has-run-tests-label.outputs.main }}
430+ HAS_RUN_FUNCTIONAL_TESTS_LABEL : ${{ steps.has-run-functional-tests-label.outputs.main }}
413431 run : |
414432 export PYTHONPATH=$(pwd)
415433
@@ -418,10 +436,13 @@ jobs:
418436 --scope mr-github
419437 --enable-lightweight-mode
420438 )
439+ elif [ "$HAS_RUN_FUNCTIONAL_TESTS_LABEL" == "true" ]; then
440+ ARGS=(
441+ --scope mr-github
442+ )
421443 else
422444 ARGS=(
423- --scope mr-slim
424- --enable-lightweight-mode
445+ --scope mr-github-slim
425446 )
426447 fi
427448
@@ -458,7 +479,7 @@ jobs:
458479 - cicd-parse-integration-tests
459480 - cicd-unit-tests-latest
460481 runs-on : ${{ needs.is-not-external-contributor.outputs.selected_runner }}
461- name : " ${{ matrix.model }}/${{ matrix.test_case }} - latest"
482+ name : ' ${{ matrix.model }}/${{ matrix.test_case }} - latest'
462483 env :
463484 PIP_DISABLE_PIP_VERSION_CHECK : 1
464485 PIP_NO_PYTHON_VERSION_WARNING : 1
@@ -472,6 +493,11 @@ jobs:
472493 && needs.pre-flight.outputs.is_merge_group == 'false'
473494 && !cancelled()
474495 steps :
496+ - name : Taint node for job isolation
497+ if : contains(needs.is-not-external-contributor.outputs.selected_runner, 'ephemeral')
498+ shell : bash
499+ run : taint-node.sh
500+
475501 - name : Checkout
476502 uses : actions/checkout@v4
477503 - name : main
@@ -481,7 +507,7 @@ jobs:
481507 model : ${{ matrix.model }}
482508 tag : latest
483509 timeout : ${{ matrix.timeout || 30 }}
484- is_unit_test : " false"
510+ is_unit_test : ' false'
485511 PAT : ${{ secrets.PAT }}
486512 container-image : ${{ env.container-registry }}/megatron-lm:${{ github.sha }}
487513
0 commit comments