@@ -61,10 +61,10 @@ jobs:
6161 echo "Current labels: $LABELS"
6262 if echo "$LABELS" | grep -q "run-bittensor-cli-tests"; then
6363 echo "run-cli-tests=true" >> $GITHUB_ENV
64- echo "::set-output name= run-cli-tests:: true"
64+ echo "run-cli-tests= true" >> $GITHUB_OUTPUT
6565 else
6666 echo "run-cli-tests=false" >> $GITHUB_ENV
67- echo "::set-output name= run-cli-tests:: false"
67+ echo "run-cli-tests= false" >> $GITHUB_OUTPUT
6868 fi
6969 env :
7070 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9191 id : get-tests
9292 run : |
9393 test_files=$(find ${{ github.workspace }}/btcli/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
94- echo "::set-output name= test-files:: $test_files"
94+ echo "test-files= $test_files" >> $GITHUB_OUTPUT
9595 shell : bash
9696
9797 pull-docker-image :
@@ -147,51 +147,47 @@ jobs:
147147 - name : Check-out repository
148148 uses : actions/checkout@v4
149149
150- - name : Install dependencies
150+ - name : Install system dependencies
151151 run : |
152152 sudo apt-get update &&
153153 sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
154154
155- - name : Create Python virtual environment
156- working-directory : ${{ github.workspace }}
157- run : python3 -m venv ${{ github.workspace }}/venv
155+ - name : Set up Python
156+ uses : actions/setup-python@v5
157+ with :
158+ python-version : ' 3.13'
159+
160+ - name : Install uv
161+ uses : astral-sh/setup-uv@v4
158162
159163 - name : Clone Bittensor CLI repo
160- working-directory : ${{ github.workspace }}
161164 run : git clone https://github.com/opentensor/btcli.git
162165
163- - name : Setup Bittensor-cli from cloned repo
166+ - name : Checkout btcli staging branch
164167 working-directory : ${{ github.workspace }}/btcli
165168 run : |
166- source ${{ github.workspace }}/venv/bin/activate
167169 git checkout staging
168170 git fetch origin staging
169171
170- - name : Install uv
171- uses : astral-sh/setup-uv@v4
172- with :
173- python-version : 3.13
174-
175- - name : Install dependencies
176- run : |
177- uv sync --extra dev --dev
172+ - name : Install btcli dependencies
173+ working-directory : ${{ github.workspace }}/btcli
174+ run : uv pip install --system '.[dev]'
178175
179176 - name : Clone async-substrate-interface repo
180177 run : git clone https://github.com/opentensor/async-substrate-interface.git
181178
182- - name : Checkout PR async-substrate-interface repo
179+ - name : Checkout PR branch in async-substrate-interface
183180 working-directory : ${{ github.workspace }}/async-substrate-interface
184181 run : |
185182 git fetch origin ${{ github.event.pull_request.head.ref }}
186183 git checkout ${{ github.event.pull_request.head.ref }}
187184 echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
188185
189- - name : Install async-substrate-interface package
186+ - name : Install async-substrate-interface with dev dependencies
190187 working-directory : ${{ github.workspace }}/async-substrate-interface
191188 run : |
192- source ${{ github.workspace }}/venv/bin/activate
193- python3 -m pip uninstall async-substrate-interface -y
194- uv pip install .
189+ uv pip uninstall --system async-substrate-interface || true
190+ uv pip install --system '.[dev]'
195191
196192 - name : Download Cached Docker Image
197193 uses : actions/download-artifact@v4
@@ -201,10 +197,8 @@ jobs:
201197 - name : Load Docker Image
202198 run : docker load -i subtensor-localnet.tar
203199
204- - name : Run tests
205- run : |
206- source ${{ github.workspace }}/venv/bin/activate
207- pytest ${{ matrix.test-file }} -s
200+ - name : Run e2e tests
201+ run : pytest ${{ matrix.test-file }} -s
208202
209203
210204 run-unit-test :
@@ -216,46 +210,47 @@ jobs:
216210 - name : Check-out repository
217211 uses : actions/checkout@v4
218212
219- - name : Install dependencies
213+ - name : Install system dependencies
220214 run : |
221215 sudo apt-get update &&
222216 sudo apt-get install -y clang curl libssl-dev llvm libudev-dev protobuf-compiler
223217
224- - name : Create Python virtual environment
225- working-directory : ${{ github.workspace }}
226- run : python3 -m venv venv
218+ - name : Set up Python
219+ uses : actions/setup-python@v5
220+ with :
221+ python-version : ' 3.13'
222+
223+ - name : Install uv
224+ uses : astral-sh/setup-uv@v4
227225
228226 - name : Clone Bittensor CLI repo
229- working-directory : ${{ github.workspace }}
230227 run : git clone https://github.com/opentensor/btcli.git
231228
232- - name : Setup Bittensor SDK from cloned repo
229+ - name : Checkout btcli staging branch
233230 working-directory : ${{ github.workspace }}/btcli
234231 run : |
235- source ${{ github.workspace }}/venv/bin/activate
236232 git checkout staging
237233 git fetch origin staging
238- python3 -m pip install --upgrade pip uv
239- uv pip install '.[dev]'
234+
235+ - name : Install btcli dependencies
236+ working-directory : ${{ github.workspace }}/btcli
237+ run : uv pip install --system '.[dev]'
240238
241239 - name : Clone async-substrate-interface repo
242240 run : git clone https://github.com/opentensor/async-substrate-interface.git
243241
244- - name : Checkout PR branch in async-substrate-interface repo
242+ - name : Checkout PR branch in async-substrate-interface
245243 working-directory : ${{ github.workspace }}/async-substrate-interface
246244 run : |
247245 git fetch origin ${{ github.event.pull_request.head.ref }}
248246 git checkout ${{ github.event.pull_request.head.ref }}
249247 echo "Current branch: $(git rev-parse --abbrev-ref HEAD)"
250248
251- - name : Install / async-substrate-interface package
249+ - name : Install async-substrate-interface with dev dependencies
252250 working-directory : ${{ github.workspace }}/async-substrate-interface
253251 run : |
254- source ${{ github.workspace }}/venv/bin/activate
255- pip uninstall async-substrate-interface -y
256- uv pip install ".[dev]"
252+ uv pip uninstall --system async-substrate-interface || true
253+ uv pip install --system '.[dev]'
257254
258255 - name : Run BTCLI unit tests
259- run : |
260- source ${{ github.workspace }}/venv/bin/activate
261- pytest ${{ github.workspace }}/btcli/tests/unit_tests
256+ run : pytest ${{ github.workspace }}/btcli/tests/unit_tests
0 commit comments