opentensor/async-substrate-interface

Rerun flaky SDK/BTCLI tests

Closed this issue ยท 0 comments

Add to workflow:

      - 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