Skip to content

Commit f42de89

Browse files
try improvement
1 parent 8841166 commit f42de89

File tree

1 file changed

+41
-5
lines changed

1 file changed

+41
-5
lines changed

.github/workflows/e2e-subtensor-tests.yaml

+41-5
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,30 @@ jobs:
6060
name: subtensor-localnet
6161
path: subtensor-localnet.tar
6262

63+
create_venv:
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Check out repository
67+
uses: actions/checkout@v4
68+
69+
- name: Install Python
70+
uses: actions/setup-python@v4
71+
72+
- name: Create Python virtual environment
73+
run: python -m venv ${{ github.workspace }}/venv
74+
75+
- name: Install dependencies
76+
run: |
77+
${{ github.workspace }}/venv/bin/pip install -e .[dev]
78+
${{ github.workspace }}/venv/bin/pip install pytest
79+
80+
- name: Upload virtual environment as artifact
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: venv
84+
path: ${{ github.workspace }}/venv
85+
86+
6387
# Job to run tests in parallel
6488
run:
6589
needs:
@@ -69,15 +93,29 @@ jobs:
6993
timeout-minutes: 45
7094
strategy:
7195
fail-fast: false # Allow other matrix jobs to run even if this job fails
72-
max-parallel: 8 # Set the maximum number of parallel jobs
96+
max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in SubtensorCI runner)
7397
matrix:
7498
os:
7599
- ubuntu-latest
76100
test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }}
77101
steps:
78-
- name: Check-out repository under $GITHUB_WORKSPACE
102+
- name: Check-out repository
79103
uses: actions/checkout@v4
80104

105+
- name: Download virtual environment
106+
uses: actions/download-artifact@v4
107+
with:
108+
name: venv
109+
path: venv
110+
111+
- name: Install Python
112+
uses: actions/setup-python@v4
113+
114+
- name: Install requirements
115+
run: |
116+
${{ github.workspace }}/venv/bin/pip install -e .[dev]
117+
${{ github.workspace }}/venv/bin/pip install pytest
118+
81119
# - name: Install uv
82120
# uses: astral-sh/setup-uv@v4
83121
#
@@ -94,6 +132,4 @@ jobs:
94132

95133
- name: Run tests
96134
run: |
97-
pip install -e .[dev]
98-
pip install pytest
99-
pytest ${{ matrix.test-file }} -s
135+
${{ github.workspace }}/venv/bin/pytest ${{ matrix.test-file }} -s

0 commit comments

Comments
 (0)