Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 33 additions & 8 deletions .github/workflows/check-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,17 @@ on:
- staging
types: [opened, synchronize, reopened, labeled, unlabeled]

workflow_dispatch:
inputs:
bittensor_branch:
description: "Optional: Bittensor branch to use instead of staging"
required: false
default: "staging"

env:
CARGO_TERM_COLOR: always
VERBOSE: ${{ github.event.inputs.verbose }}
BITTENSOR_BRANCH: ${{ github.event.inputs.bittensor_branch || 'staging' }}

jobs:
apply-label-to-new-pr:
Expand Down Expand Up @@ -79,9 +87,15 @@ jobs:
working-directory: ${{ github.workspace }}
run: git clone https://github.com/opentensor/bittensor.git

- name: Checkout
- name: Verify and checkout Bittensor branch
working-directory: ${{ github.workspace }}/bittensor
run: git checkout staging
run: |
if ! git fetch origin $BITTENSOR_BRANCH; then
echo "❌ Error: Branch '$BITTENSOR_BRANCH' does not exist in opentensor/bittensor."
exit 1
fi
git checkout FETCH_HEAD
echo "✅ Using Bittensor branch: $BITTENSOR_BRANCH"

- name: Install dependencies
run: sudo apt-get install -y jq
Expand All @@ -90,11 +104,14 @@ jobs:
id: get-tests
run: |
test_files=$(find ${{ github.workspace }}/bittensor/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
echo "::set-output name=test-files::$test_files"
echo "test-files=$test_files" >> $GITHUB_OUTPUT
shell: bash

pull-docker-image:
needs: check-labels
needs:
- check-labels
- find-e2e-tests

runs-on: ubuntu-latest
if: always() && needs.check-labels.outputs.run-sdk-tests == 'true'
steps:
Expand Down Expand Up @@ -163,8 +180,12 @@ jobs:
working-directory: ${{ github.workspace }}/bittensor
run: |
source ${{ github.workspace }}/venv/bin/activate
git checkout staging
git fetch origin staging
if ! git fetch origin $BITTENSOR_BRANCH; then
echo "❌ Error: Branch '$BITTENSOR_BRANCH' does not exist in opentensor/bittensor."
exit 1
fi
git checkout FETCH_HEAD
echo "✅ Using Bittensor branch: $BITTENSOR_BRANCH"
python3 -m pip install --upgrade pip
python3 -m pip install '.[dev]'

Expand Down Expand Up @@ -225,8 +246,12 @@ jobs:
working-directory: ${{ github.workspace }}/bittensor
run: |
source ${{ github.workspace }}/venv/bin/activate
git checkout staging
git fetch origin staging
if ! git fetch origin $BITTENSOR_BRANCH; then
echo "❌ Error: Branch '$BITTENSOR_BRANCH' does not exist in opentensor/bittensor."
exit 1
fi
git checkout FETCH_HEAD
echo "✅ Using Bittensor branch: $BITTENSOR_BRANCH"
python3 -m pip install --upgrade pip
python3 -m pip install '.[dev]'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: E2E Tests
name: ASI E2E Tests

concurrency:
group: e2e-${{ github.event.pull_request.number || github.ref }}
Expand Down
Loading