1818 - main
1919 types : [opened, synchronize, reopened, labeled, unlabeled]
2020
21+ workflow_dispatch :
22+ inputs :
23+ verbose :
24+ description : " Output more information when triggered manually"
25+ required : false
26+ default : " "
27+
2128env :
2229 CARGO_TERM_COLOR : always
2330 VERBOSE : ${{ github.event.inputs.verbose }}
2431
2532jobs :
2633 apply-label-to-new-pr :
2734 runs-on : ubuntu-latest
28- if : ${{ github.event.pull_request.draft == false }}
2935 outputs :
3036 should_continue : ${{ steps.check.outputs.should_continue }}
3137 steps :
6369 LABELS=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
6470 echo "Current labels: $LABELS"
6571 if echo "$LABELS" | grep -q "run-bittensor-e2e-tests"; then
66- echo "run-bittensor-e2e-tests=true" >> $GITHUB_ENV
67- echo "::set-output name=run-bittensor-e2e-tests::true"
72+ echo "run-bittensor-e2e-tests=true" >> $GITHUB_OUTPUT
6873 else
69- echo "run-bittensor-e2e-tests=false" >> $GITHUB_ENV
70- echo "::set-output name=run-bittensor-e2e-tests::false"
74+ echo "run-bittensor-e2e-tests=false" >> $GITHUB_OUTPUT
7175 fi
7276 env :
7377 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
9498 id : get-btcli-tests
9599 run : |
96100 test_files=$(find ${{ github.workspace }}/btcli/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
97- echo "::set-output name= test-files:: $test_files"
101+ echo "test-files= $test_files" >> $GITHUB_OUTPUT
98102 shell : bash
99103
100104 find-sdk-e2e-tests :
@@ -119,7 +123,7 @@ jobs:
119123 id : get-sdk-tests
120124 run : |
121125 test_files=$(find ${{ github.workspace }}/bittensor/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
122- echo "::set-output name= test-files:: $test_files"
126+ echo "test-files= $test_files" >> $GITHUB_OUTPUT
123127 shell : bash
124128
125129 build-image-with-current-branch :
@@ -128,6 +132,13 @@ jobs:
128132 steps :
129133 - name : Checkout code
130134 uses : actions/checkout@v4
135+ with :
136+ ref : ${{ github.head_ref }}
137+
138+ - name : Patch non-fast-block node
139+ run : |
140+ chmod +x ./scripts/localnet_patch.sh
141+ ./scripts/localnet_patch.sh
131142
132143 - name : Set up QEMU
133144 uses : docker/setup-qemu-action@v3
@@ -182,6 +193,8 @@ jobs:
182193
183194 - name : Install uv
184195 uses : astral-sh/setup-uv@v5
196+ with :
197+ enable-cache : ' false'
185198
186199 - name : Create Python virtual environment
187200 working-directory : ${{ github.workspace }}
@@ -201,10 +214,6 @@ jobs:
201214 uv run --active pip install '.[dev]'
202215 uv run --active pip install pytest
203216
204- - name : Install uv dependencies
205- working-directory : ${{ github.workspace }}/btcli
206- run : uv sync --all-extras --dev
207-
208217 - name : Download Cached Docker Image
209218 uses : actions/download-artifact@v4
210219 with :
@@ -213,6 +222,9 @@ jobs:
213222 - name : Load Docker Image
214223 run : docker load -i subtensor-localnet.tar
215224
225+ - name : Retag Docker Image
226+ run : docker tag localnet ghcr.io/opentensor/subtensor-localnet:devnet-ready
227+
216228# - name: Run tests
217229# working-directory: ${{ github.workspace }}/btcli
218230# run: |
@@ -223,6 +235,7 @@ jobs:
223235 working-directory : ${{ github.workspace }}/btcli
224236 run : |
225237 source ${{ github.workspace }}/venv/bin/activate
238+ export SKIP_PULL=1
226239 set +e
227240 for i in 1 2; do
228241 echo "🔁 Attempt $i: Running tests"
@@ -277,6 +290,8 @@ jobs:
277290
278291 - name : Install uv
279292 uses : astral-sh/setup-uv@v5
293+ with :
294+ enable-cache : ' false'
280295
281296 - name : Create Python virtual environment
282297 working-directory : ${{ github.workspace }}
@@ -296,10 +311,6 @@ jobs:
296311 uv run --active pip install '.[dev]'
297312 uv run --active pip install pytest
298313
299- - name : Install uv dependencies
300- working-directory : ${{ github.workspace }}/bittensor
301- run : uv sync --all-extras --dev
302-
303314 - name : Download Cached Docker Image
304315 uses : actions/download-artifact@v4
305316 with :
@@ -308,6 +319,9 @@ jobs:
308319 - name : Load Docker Image
309320 run : docker load -i subtensor-localnet.tar
310321
322+ - name : Retag Docker Image
323+ run : docker tag localnet ghcr.io/opentensor/subtensor-localnet:devnet-ready
324+
311325# - name: Run tests
312326# working-directory: ${{ github.workspace }}/bittensor
313327# run: |
@@ -318,6 +332,7 @@ jobs:
318332 working-directory : ${{ github.workspace }}/bittensor
319333 run : |
320334 source ${{ github.workspace }}/venv/bin/activate
335+ export SKIP_PULL=1
321336 set +e
322337 for i in 1 2; do
323338 echo "🔁 Attempt $i: Running tests"
@@ -335,4 +350,4 @@ jobs:
335350 echo "🕒 Retrying..."
336351 sleep 5
337352 fi
338- done
353+ done
0 commit comments