From 6784b85f46eb6b20a50ba3cd1d0e67026ffa6c7c Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 12:37:58 -0700 Subject: [PATCH 1/7] add `LOCALNET_IMAGE_NAME` local env variable --- tests/e2e_tests/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e_tests/conftest.py b/tests/e2e_tests/conftest.py index 863e9c3210..c79446be26 100644 --- a/tests/e2e_tests/conftest.py +++ b/tests/e2e_tests/conftest.py @@ -18,7 +18,7 @@ setup_wallet, ) -LOCALNET_IMAGE_NAME = "ghcr.io/opentensor/subtensor-localnet:devnet-ready" +LOCALNET_IMAGE_NAME = os.getenv("LOCALNET_IMAGE_NAME") or "ghcr.io/opentensor/subtensor-localnet:devnet-ready" CONTAINER_NAME_PREFIX = "test_local_chain_" From dc489207d13d7797d6aa896d53f0ee070f74ccb1 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 12:38:15 -0700 Subject: [PATCH 2/7] add nightly tests --- .../nightly-e2e-tests-subtensor-main.yml | 358 ++++++++++++++++++ 1 file changed, 358 insertions(+) create mode 100644 .github/workflows/nightly-e2e-tests-subtensor-main.yml diff --git a/.github/workflows/nightly-e2e-tests-subtensor-main.yml b/.github/workflows/nightly-e2e-tests-subtensor-main.yml new file mode 100644 index 0000000000..bf5cfba0eb --- /dev/null +++ b/.github/workflows/nightly-e2e-tests-subtensor-main.yml @@ -0,0 +1,358 @@ +name: Nightly E2E Subtensor tests (main) + +concurrency: + group: e2e-subtensor-${{ github.ref }} + cancel-in-progress: true + +on: + schedule: + - cron: '0 9 * * *' # Run every night at 2:00 PST + + workflow_dispatch: + inputs: + verbose: + description: "Output more information when triggered manually" + required: false + default: "" + +env: + CARGO_TERM_COLOR: always + VERBOSE: ${{ github.event.inputs.verbose }} + +# job to run tests in parallel +jobs: + # Looking for e2e tests + find-tests: + runs-on: ubuntu-latest + if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} + outputs: + test-files: ${{ steps.get-tests.outputs.test-files }} + steps: + - name: Check-out repository under $GITHUB_WORKSPACE + uses: actions/checkout@v4 + + - name: Find test files + id: get-tests + run: | + test_files=$(find tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))') + # keep it here for future debug + # test_files=$(find tests/e2e_tests -type f -name "test*.py" | grep -E 'test_(hotkeys|staking)\.py$' | jq -R -s -c 'split("\n") | map(select(. != ""))') + echo "test-files=$test_files" >> "$GITHUB_OUTPUT" + shell: bash + # Pull docker images (devnet-ready and main) + pull-docker-images: + runs-on: ubuntu-latest + steps: + - name: Log in to GitHub Container Registry + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin + + - name: Pull Docker Image + run: | + docker pull ghcr.io/opentensor/subtensor-localnet:main + docker pull ghcr.io/opentensor/subtensor-localnet:devnet-ready + + - name: List pulled images + run: docker images + + - name: Save Docker Images to Cache + run: | + docker save -o subtensor-localnet-main.tar ghcr.io/opentensor/subtensor-localnet:main + docker save -o subtensor-localnet-devnet-ready.tar ghcr.io/opentensor/subtensor-localnet:devnet-ready + + - name: Upload main Docker Image as Artifact + uses: actions/upload-artifact@v4 + with: + name: subtensor-localnet-main + path: subtensor-localnet-main.tar + + - name: Upload devnet-ready Docker Image as Artifact + uses: actions/upload-artifact@v4 + with: + name: subtensor-localnet-devnet-ready + path: subtensor-localnet-devnet-ready.tar + # Determine the day for non-fast-blocks run + check-if-saturday: + runs-on: ubuntu-latest + outputs: + is-saturday: ${{ steps.check.outputs.is-saturday }} + steps: + - id: check + run: | + day=$(date -u +%u) + echo "Today is weekday $day" + if [ "$day" -ne 6 ]; then + echo "⏭️ Skipping: not Saturday" + echo "is-saturday=false" >> "$GITHUB_OUTPUT" + exit 0 + fi + echo "is-saturday=true" + echo "is-saturday=true" >> "$GITHUB_OUTPUT" + + # Daily run of fast-blocks tests from `bittensor:master` based on `subtensor:main docker` image + run-fast-blocks-e2e-test-master: + name: "FB master: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}" + needs: + - find-tests + - pull-docker-images + runs-on: ubuntu-latest + timeout-minutes: 25 + strategy: + fail-fast: false # Allow other matrix jobs to run even if this job fails + max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner) + matrix: + os: + - ubuntu-latest + test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - name: Check-out repository + uses: actions/checkout@v4 + with: + ref: master + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: install dependencies + run: uv sync --extra dev --dev + + - name: Download Cached Docker Image + uses: actions/download-artifact@v4 + with: + name: subtensor-localnet-main + + - name: Load Docker Image + run: docker load -i subtensor-localnet-main.tar + + - name: Run tests with retry + env: + FAST_BLOCKS: "1" + LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:main" + run: | + set +e + for i in 1 2 3; do + echo "🔁 Attempt $i: Running tests" + uv run pytest ${{ matrix.test-file }} -s + status=$? + if [ $status -eq 0 ]; then + echo "✅ Tests passed on attempt $i" + break + else + echo "❌ Tests failed on attempt $i" + if [ $i -eq 3 ]; then + echo "Tests failed after 3 attempts" + exit 1 + fi + echo "Retrying..." + sleep 5 + fi + done + + # Daily run of fast-blocks tests from `bittensor:staging` based on `subtensor:devnet-ready` docker image + run-fast-blocks-e2e-test-staging: + name: "FB staging: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}" + needs: + - find-tests + - pull-docker-images + runs-on: ubuntu-latest + timeout-minutes: 25 + strategy: + fail-fast: false # Allow other matrix jobs to run even if this job fails + max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner) + matrix: + os: + - ubuntu-latest + test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + steps: + - name: Check-out repository + uses: actions/checkout@v4 + with: + ref: staging + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: install dependencies + run: uv sync --extra dev --dev + + - name: Download Cached Docker Image + uses: actions/download-artifact@v4 + with: + name: subtensor-localnet-devnet-ready + + - name: Load Docker Image + run: docker load -i subtensor-localnet-devnet-ready.tar + + - name: Run tests with retry + env: + FAST_BLOCKS: "1" + LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:devnet-ready" + run: | + set +e + for i in 1 2 3; do + echo "🔁 Attempt $i: Running tests" + uv run pytest ${{ matrix.test-file }} -s + status=$? + if [ $status -eq 0 ]; then + echo "✅ Tests passed on attempt $i" + break + else + echo "❌ Tests failed on attempt $i" + if [ $i -eq 3 ]; then + echo "Tests failed after 3 attempts" + exit 1 + fi + echo "Retrying..." + sleep 5 + fi + done + + # Saturday run of non-fast-blocks tests from `bittensor:master` based on `subtensor:main` docker image + run-non-fast-blocks-e2e-test-master: + if: needs.check-if-saturday.outputs.is-saturday == 'true' + name: "NFB master: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}" + needs: + - check-if-saturday + - find-tests + - pull-docker-images + runs-on: ubuntu-latest + timeout-minutes: 1440 + + strategy: + fail-fast: false # Allow other matrix jobs to run even if this job fails + max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner) + matrix: + os: + - ubuntu-latest + test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Check-out repository + uses: actions/checkout@v4 + with: + ref: master + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: install dependencies + run: uv sync --extra dev --dev + + - name: Download Cached Docker Image + uses: actions/download-artifact@v4 + with: + name: subtensor-localnet-main + + - name: Load Docker Image + run: docker load -i subtensor-localnet-main.tar + + - name: Run patched E2E tests + env: + FAST_BLOCKS: "0" + LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:main" + run: | + set +e + for i in 1 2 3; do + echo "🔁 Attempt $i: Running tests" + uv run pytest ${{ matrix.test-file }} -s + status=$? + if [ $status -eq 0 ]; then + echo "✅ Tests passed on attempt $i" + break + else + echo "❌ Tests failed on attempt $i" + if [ $i -eq 3 ]; then + echo "Tests failed after 3 attempts" + exit 1 + fi + echo "Retrying..." + sleep 5 + fi + done + + # Saturday run of non-fast-blocks tests from `bittensor:staging` based on `subtensor:devnet-ready` docker image + run-non-fast-blocks-e2e-test-staging: + if: needs.check-if-saturday.outputs.is-saturday == 'true' + name: "NFB staging: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}" + needs: + - check-if-saturday + - find-tests + - pull-docker-images + runs-on: ubuntu-latest + timeout-minutes: 1440 + + strategy: + fail-fast: false # Allow other matrix jobs to run even if this job fails + max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner) + matrix: + os: + - ubuntu-latest + test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + + steps: + - name: Check-out repository + uses: actions/checkout@v4 + with: + ref: staging + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@v4 + + - name: install dependencies + run: uv sync --extra dev --dev + + - name: Download Cached Docker Image + uses: actions/download-artifact@v4 + with: + name: subtensor-localnet-devnet-ready + + - name: Load Docker Image + run: docker load -i subtensor-localnet-devnet-ready.tar + + - name: Run patched E2E tests + env: + FAST_BLOCKS: "0" + LOCALNET_IMAGE_NAME: "ghcr.io/opentensor/subtensor-localnet:devnet-ready" + run: | + set +e + for i in 1 2 3; do + echo "🔁 Attempt $i: Running tests" + uv run pytest ${{ matrix.test-file }} -s + status=$? + if [ $status -eq 0 ]; then + echo "✅ Tests passed on attempt $i" + break + else + echo "❌ Tests failed on attempt $i" + if [ $i -eq 3 ]; then + echo "Tests failed after 3 attempts" + exit 1 + fi + echo "Retrying..." + sleep 5 + fi + done + From 07952fcf4512d07e3f82d64df49646f446a2edbc Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 12:38:36 -0700 Subject: [PATCH 3/7] cleanup and improve regular e2e tests workflow --- .github/workflows/e2e-subtensor-tests.yaml | 118 ++++----------------- 1 file changed, 23 insertions(+), 95 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index 364b96698b..7c8fcc017b 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -6,15 +6,12 @@ concurrency: on: push: - branches: [master, development, staging] + branches: * pull_request: - branches: [master, development, staging] + branches: * types: [ opened, synchronize, reopened, ready_for_review ] - schedule: - - cron: '0 9 * * *' # Run every night at 2:00 PST - workflow_dispatch: inputs: verbose: @@ -28,7 +25,7 @@ env: # job to run tests in parallel jobs: - + # Looking for e2e tests find-tests: runs-on: ubuntu-latest if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }} @@ -44,20 +41,36 @@ jobs: test_files=$(find tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))') # keep it here for future debug # test_files=$(find tests/e2e_tests -type f -name "test*.py" | grep -E 'test_(hotkeys|staking)\.py$' | jq -R -s -c 'split("\n") | map(select(. != ""))') + echo "Found test files: $test_files" echo "test-files=$test_files" >> "$GITHUB_OUTPUT" shell: bash + # Pull docker image pull-docker-image: runs-on: ubuntu-latest + outputs: + image-name: ${{ steps.set-output.outputs.image-name }} steps: + - name: Set Docker image tag based on branch + id: set-output + run: | + ref="${{ github.ref_name }}" + if [[ "$ref" == "master" ]]; then + image="ghcr.io/opentensor/subtensor-localnet:main" + else + image="ghcr.io/opentensor/subtensor-localnet:devnet-ready" + fi + echo "Using image: $image" + echo "image-name=$image" >> "$GITHUB_OUTPUT" + - name: Log in to GitHub Container Registry run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_ACTOR --password-stdin - name: Pull Docker Image - run: docker pull ghcr.io/opentensor/subtensor-localnet:devnet-ready + run: docker pull ${{ steps.set-output.outputs.image-name }} - name: Save Docker Image to Cache - run: docker save -o subtensor-localnet.tar ghcr.io/opentensor/subtensor-localnet:devnet-ready + run: docker save -o subtensor-localnet.tar ${{ steps.set-output.outputs.image-name }} - name: Upload Docker Image as Artifact uses: actions/upload-artifact@v4 @@ -104,95 +117,9 @@ jobs: - name: Load Docker Image run: docker load -i subtensor-localnet.tar -# - name: Run tests -# run: uv run pytest ${{ matrix.test-file }} -s - - name: Run tests with retry - run: | - set +e - for i in 1 2 3; do - echo "🔁 Attempt $i: Running tests" - uv run pytest ${{ matrix.test-file }} -s - status=$? - if [ $status -eq 0 ]; then - echo "✅ Tests passed on attempt $i" - break - else - echo "❌ Tests failed on attempt $i" - if [ $i -eq 3 ]; then - echo "Tests failed after 3 attempts" - exit 1 - fi - echo "Retrying..." - sleep 5 - fi - done - - # run non-fast-blocks only on Saturday and by cron schedule - check-if-saturday: - if: github.event_name == 'schedule' - runs-on: ubuntu-latest - outputs: - is-saturday: ${{ steps.check.outputs.is-saturday }} - steps: - - id: check - run: | - day=$(date -u +%u) - echo "Today is weekday $day" - if [ "$day" -ne 6 ]; then - echo "⏭️ Skipping: not Saturday" - echo "is-saturday=false" >> "$GITHUB_OUTPUT" - exit 0 - fi - echo "is-saturday=true" - echo "is-saturday=true" >> "$GITHUB_OUTPUT" - - - cron-run-non-fast-blocks-e2e-test: - if: github.event_name == 'schedule' && needs.check-if-saturday.outputs.is-saturday == 'true' - name: "NFB: ${{ matrix.test-file }} / Python ${{ matrix.python-version }}" - needs: - - check-if-saturday - - find-tests - - pull-docker-image - runs-on: ubuntu-latest - timeout-minutes: 1440 - - strategy: - fail-fast: false # Allow other matrix jobs to run even if this job fails - max-parallel: 32 # Set the maximum number of parallel jobs (same as we have cores in ubuntu-latest runner) - matrix: - os: - - ubuntu-latest - test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] - - steps: - - name: Check-out repository - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install uv - uses: astral-sh/setup-uv@v4 - - - name: install dependencies - run: uv sync --extra dev --dev - - - name: Download Cached Docker Image - uses: actions/download-artifact@v4 - with: - name: subtensor-localnet - - - name: Load Docker Image - run: docker load -i subtensor-localnet.tar - - - name: Run patched E2E tests env: - FAST_BLOCKS: "0" + LOCALNET_IMAGE_NAME: ${{ needs.pull-docker-image.outputs.image-name }} run: | set +e for i in 1 2 3; do @@ -212,3 +139,4 @@ jobs: sleep 5 fi done + From 320afde386c2f11b2e50f549bf15e6d0e4363449 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 12:56:53 -0700 Subject: [PATCH 4/7] improve --- .github/workflows/e2e-subtensor-tests.yaml | 3 ++- .../workflows/nightly-e2e-tests-subtensor-main.yml | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index 7c8fcc017b..72ad5fa799 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -22,6 +22,7 @@ on: env: CARGO_TERM_COLOR: always VERBOSE: ${{ github.event.inputs.verbose }} + PYTHON_VERSIONS: '["3.9", "3.10", "3.11", "3.12", "3.13"]' # job to run tests in parallel jobs: @@ -93,7 +94,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} steps: - name: Check-out repository uses: actions/checkout@v4 diff --git a/.github/workflows/nightly-e2e-tests-subtensor-main.yml b/.github/workflows/nightly-e2e-tests-subtensor-main.yml index bf5cfba0eb..b2b2acd0cc 100644 --- a/.github/workflows/nightly-e2e-tests-subtensor-main.yml +++ b/.github/workflows/nightly-e2e-tests-subtensor-main.yml @@ -1,4 +1,4 @@ -name: Nightly E2E Subtensor tests (main) +name: Nightly E2E Subtensor tests concurrency: group: e2e-subtensor-${{ github.ref }} @@ -18,6 +18,7 @@ on: env: CARGO_TERM_COLOR: always VERBOSE: ${{ github.event.inputs.verbose }} + PYTHON_VERSIONS: '["3.9", "3.10", "3.11", "3.12", "3.13"]' # job to run tests in parallel jobs: @@ -37,8 +38,10 @@ jobs: test_files=$(find tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))') # keep it here for future debug # test_files=$(find tests/e2e_tests -type f -name "test*.py" | grep -E 'test_(hotkeys|staking)\.py$' | jq -R -s -c 'split("\n") | map(select(. != ""))') + echo "Found test files: $test_files" echo "test-files=$test_files" >> "$GITHUB_OUTPUT" shell: bash + # Pull docker images (devnet-ready and main) pull-docker-images: runs-on: ubuntu-latest @@ -103,7 +106,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} steps: - name: Check-out repository uses: actions/checkout@v4 @@ -168,7 +171,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} steps: - name: Check-out repository uses: actions/checkout@v4 @@ -236,7 +239,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} steps: - name: Check-out repository @@ -305,7 +308,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} steps: - name: Check-out repository @@ -355,4 +358,3 @@ jobs: sleep 5 fi done - From fcc6a359f8c16d24a23ce71d1e70c1b37467f1d0 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 12:59:41 -0700 Subject: [PATCH 5/7] fix `- '**'` --- .github/workflows/e2e-subtensor-tests.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index 72ad5fa799..d0b74eb4e3 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -6,10 +6,11 @@ concurrency: on: push: - branches: * - + branches: + - '**' pull_request: - branches: * + branches: + - '**' types: [ opened, synchronize, reopened, ready_for_review ] workflow_dispatch: From 183d65c85764dd416cd486d28757147be1904445 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 13:02:14 -0700 Subject: [PATCH 6/7] fix python version --- .github/workflows/e2e-subtensor-tests.yaml | 3 +-- .github/workflows/nightly-e2e-tests-subtensor-main.yml | 9 ++++----- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/e2e-subtensor-tests.yaml b/.github/workflows/e2e-subtensor-tests.yaml index d0b74eb4e3..b8e672ef8e 100644 --- a/.github/workflows/e2e-subtensor-tests.yaml +++ b/.github/workflows/e2e-subtensor-tests.yaml @@ -23,7 +23,6 @@ on: env: CARGO_TERM_COLOR: always VERBOSE: ${{ github.event.inputs.verbose }} - PYTHON_VERSIONS: '["3.9", "3.10", "3.11", "3.12", "3.13"]' # job to run tests in parallel jobs: @@ -95,7 +94,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Check-out repository uses: actions/checkout@v4 diff --git a/.github/workflows/nightly-e2e-tests-subtensor-main.yml b/.github/workflows/nightly-e2e-tests-subtensor-main.yml index b2b2acd0cc..3ef9434382 100644 --- a/.github/workflows/nightly-e2e-tests-subtensor-main.yml +++ b/.github/workflows/nightly-e2e-tests-subtensor-main.yml @@ -18,7 +18,6 @@ on: env: CARGO_TERM_COLOR: always VERBOSE: ${{ github.event.inputs.verbose }} - PYTHON_VERSIONS: '["3.9", "3.10", "3.11", "3.12", "3.13"]' # job to run tests in parallel jobs: @@ -106,7 +105,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Check-out repository uses: actions/checkout@v4 @@ -171,7 +170,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Check-out repository uses: actions/checkout@v4 @@ -239,7 +238,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Check-out repository @@ -308,7 +307,7 @@ jobs: os: - ubuntu-latest test-file: ${{ fromJson(needs.find-tests.outputs.test-files) }} - python-version: ${{ fromJson(env.PYTHON_VERSIONS) }} + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: - name: Check-out repository From 21821b8468dd57631fbcc3544970dcd7a5d4de06 Mon Sep 17 00:00:00 2001 From: Roman Date: Wed, 16 Jul 2025 13:03:59 -0700 Subject: [PATCH 7/7] add permissions --- .github/workflows/nightly-e2e-tests-subtensor-main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightly-e2e-tests-subtensor-main.yml b/.github/workflows/nightly-e2e-tests-subtensor-main.yml index 3ef9434382..589141ec1b 100644 --- a/.github/workflows/nightly-e2e-tests-subtensor-main.yml +++ b/.github/workflows/nightly-e2e-tests-subtensor-main.yml @@ -1,5 +1,9 @@ name: Nightly E2E Subtensor tests +permissions: + contents: read + packages: write + concurrency: group: e2e-subtensor-${{ github.ref }} cancel-in-progress: true