@@ -4,9 +4,11 @@ name: E2E (NVIDIA L40S x4) SDK Test
44
55on :
66 # only run on PRs that touch certain regex paths
7- pull_request :
7+ # only run on PRs that touch certain regex paths
8+ pull_request_target :
89 branches :
910 - main
11+ - release-*
1012 paths :
1113 # note this should match the merging criteria in 'mergify.yml'
1214 - " **.py"
1517 - " requirements.txt"
1618 - " requirements-dev.txt"
1719 - " constraints-dev.txt"
18- - " .github/workflows/e2e-nvidia-l40s-x4-sdk.yaml" # This workflow
19- workflow_dispatch :
20- inputs :
21- pr_or_branch :
22- description : ' pull request number or branch name'
23- required : true
24- default : ' main'
20+ - " .github/workflows/*.yml" # This workflow
21+ workflow_dispatch : {}
2522concurrency :
2623 group : ${{ github.workflow }}-${{ github.event.number || github.ref }}
2724 cancel-in-progress : true
2825
2926env :
3027 TMPDIR : /home/tmp
3128
29+ defaults :
30+ run :
31+ shell : bash
32+
33+
34+ permissions :
35+ contents : read
36+
3237jobs :
3338 start-large-ec2-runner :
3439 runs-on : ubuntu-latest
@@ -97,15 +102,13 @@ jobs:
97102 - start-large-ec2-runner
98103 runs-on : ${{ needs.start-large-ec2-runner.outputs.label }}
99104
100- permissions :
101- pull-requests : write
105+
106+ # It is important that this job has no write permissions and has
107+ # no access to any secrets. This part (e2e-medium-test) is where we are running
108+ # untrusted code from PRs.
109+ permissions : {}
102110
103111 steps :
104- - name : " Harden Runner"
105- # v2.10.1
106- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
107- with :
108- egress-policy : audit
109112 - name : Install Packages
110113 run : |
111114 cat /etc/os-release
@@ -207,12 +210,6 @@ jobs:
207210 runs-on : ubuntu-latest
208211 if : ${{ always() }}
209212 steps :
210- - name : " Harden Runner"
211- # v2.10.1
212- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
213- with :
214- egress-policy : audit
215-
216213 - name : Configure AWS credentials
217214 uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
218215 with :
@@ -234,12 +231,6 @@ jobs:
234231 runs-on : ubuntu-latest
235232 if : ${{ always() }}
236233 steps :
237- - name : " Harden Runner"
238- # v2.10.1
239- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
240- with :
241- egress-policy : audit
242-
243234 - name : Configure AWS credentials
244235 uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
245236 with :
@@ -324,4 +315,15 @@ jobs:
324315 if : steps.phase-2-upload-s3.outcome == 'failure'
325316 run : |
326317 echo "::warning::Failed to upload Phase 2 loss graph to S3. This won't block the workflow, but you may want to investigate."
327- echo "Loss graph upload failed" >> "${GITHUB_STEP_SUMMARY}"
318+ echo "Loss graph upload failed" >> "${GITHUB_STEP_SUMMARY}"
319+
320+ e2e-medium-workflow-complete :
321+ # we don't want to block PRs on failed EC2 cleanup
322+ # so not requiring "stop-medium-ec2-runner" as well
323+ permissions :
324+ checks : read
325+ uses : ./.github/workflows/status-checks.yml
326+ with :
327+ job_ids : >- # Space-separated job ids to wait on for status checks
328+ start-large-ec2-runner
329+ e2e-medium-test
0 commit comments