Skip to content

Commit eb36249

Browse files
committed
improve reusable workflow
1 parent 15e606d commit eb36249

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

.github/workflows/_run-e2e-single.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# WARNING: This file is used by multiple workflows. Please modify with caution. Any changes here may affect multiple
2+
# CI/CD pipelines.
3+
14
name: Run Single E2E Test with multiple Python versions
25

36
on:
@@ -13,6 +16,16 @@ on:
1316
required: true
1417
type: string
1518
description: JSON array of Python versions
19+
ref:
20+
required: false
21+
type: string
22+
description: Git ref to checkout
23+
default: ""
24+
artifact-name:
25+
required: false
26+
type: string
27+
description: Docker image artifact name
28+
default: "subtensor-localnet"
1629

1730
jobs:
1831
run-e2e:
@@ -28,6 +41,8 @@ jobs:
2841
steps:
2942
- name: Check-out repository
3043
uses: actions/checkout@v4
44+
with:
45+
ref: ${{ inputs.ref != '' && inputs.ref || github.ref }}
3146

3247
- name: Set up Python ${{ matrix.python-version }}
3348
uses: actions/setup-python@v5
@@ -57,10 +72,10 @@ jobs:
5772
- name: Download Cached Docker Image
5873
uses: actions/download-artifact@v4
5974
with:
60-
name: subtensor-localnet
75+
name: ${{ inputs.artifact-name }}
6176

6277
- name: Load Docker Image
63-
run: docker load -i subtensor-localnet.tar
78+
run: docker load -i ${{ inputs.artifact-name }}.tar
6479

6580
- name: Run test with retry
6681
env:

0 commit comments

Comments
 (0)