@@ -4,9 +4,11 @@ name: E2E (NVIDIA L40S x4) SDK Test
4
4
5
5
on :
6
6
# 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 :
8
9
branches :
9
10
- main
11
+ - release-*
10
12
paths :
11
13
# note this should match the merging criteria in 'mergify.yml'
12
14
- " **.py"
15
17
- " requirements.txt"
16
18
- " requirements-dev.txt"
17
19
- " 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 : {}
25
22
concurrency :
26
23
group : ${{ github.workflow }}-${{ github.event.number || github.ref }}
27
24
cancel-in-progress : true
28
25
29
26
env :
30
27
TMPDIR : /home/tmp
31
28
29
+ defaults :
30
+ run :
31
+ shell : bash
32
+
33
+
34
+ permissions :
35
+ contents : read
36
+
32
37
jobs :
33
38
start-large-ec2-runner :
34
39
runs-on : ubuntu-latest
@@ -97,15 +102,13 @@ jobs:
97
102
- start-large-ec2-runner
98
103
runs-on : ${{ needs.start-large-ec2-runner.outputs.label }}
99
104
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 : {}
102
110
103
111
steps :
104
- - name : " Harden Runner"
105
- # v2.10.1
106
- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
107
- with :
108
- egress-policy : audit
109
112
- name : Install Packages
110
113
run : |
111
114
cat /etc/os-release
@@ -207,12 +210,6 @@ jobs:
207
210
runs-on : ubuntu-latest
208
211
if : ${{ always() }}
209
212
steps :
210
- - name : " Harden Runner"
211
- # v2.10.1
212
- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
213
- with :
214
- egress-policy : audit
215
-
216
213
- name : Configure AWS credentials
217
214
uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
218
215
with :
@@ -234,12 +231,6 @@ jobs:
234
231
runs-on : ubuntu-latest
235
232
if : ${{ always() }}
236
233
steps :
237
- - name : " Harden Runner"
238
- # v2.10.1
239
- uses : step-security/harden-runner@c6295a65d1254861815972266d5933fd6e532bdf
240
- with :
241
- egress-policy : audit
242
-
243
234
- name : Configure AWS credentials
244
235
uses : aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
245
236
with :
@@ -324,4 +315,15 @@ jobs:
324
315
if : steps.phase-2-upload-s3.outcome == 'failure'
325
316
run : |
326
317
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