@@ -26,13 +26,35 @@ jobs:
26
26
- name : Check out repository
27
27
uses : actions/checkout@v4
28
28
29
+ find-e2e-tests :
30
+ runs-on : ubuntu-latest
31
+ outputs :
32
+ test-files : ${{ steps.get-tests.outputs.test-files }}
33
+ steps :
34
+ - name : Research preparation
35
+ working-directory : ${{ github.workspace }}
36
+ run : git clone https://github.com/opentensor/bittensor.git
37
+
38
+ - name : Checkout
39
+ working-directory : ${{ github.workspace }}/bittensor
40
+ run : git checkout staging
41
+
42
+ - name : Install dependencies
43
+ run : sudo apt-get install -y jq
44
+
45
+ - name : Find e2e test files
46
+ id : get-tests
47
+ run : |
48
+ test_files=$(find ${{ github.workspace }}/bittensor/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
49
+ echo "::set-output name=test-files::$test_files"
50
+ shell : bash
51
+
29
52
run-tests :
30
53
needs :
54
+ - find-e2e-tests
31
55
- check-labels
32
56
runs-on : ubuntu-latest
33
57
if : ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false && needs.check-labels.outputs.run-sdk-tests == 'true' }}
34
- outputs :
35
- test-files : ${{ steps.get-tests.outputs.test-files }}
36
58
strategy :
37
59
fail-fast : false
38
60
max-parallel : 8
43
65
- x86_64-unknown-linux-gnu
44
66
os :
45
67
- ubuntu-latest
46
- test-file : ${{ fromJson(outputs.test-files) }}
68
+ test-file : ${{ fromJson(needs.find-e2e-tests. outputs.test-files) }}
47
69
timeout-minutes : 60
48
70
steps :
49
71
- name : Check-out repository
@@ -99,19 +121,6 @@ jobs:
99
121
source ${{ github.workspace }}/venv/bin/activate
100
122
maturin develop
101
123
102
- - name : Debug test files directory
103
- run : |
104
- ls -la ${{ github.workspace }}/bittensor/tests/e2e_tests
105
- shell : bash
106
-
107
- - name : Find e2e test files
108
- id : get-tests
109
- run : |
110
- test_files=$(find ${{ github.workspace }}/bittensor/tests/e2e_tests -name "test*.py" | jq -R -s -c 'split("\n") | map(select(. != ""))')
111
- echo "Detected test files: $test_files"
112
- echo "::set-output name=test-files::$test_files"
113
- shell : bash
114
-
115
124
- name : Clone Subtensor repo
116
125
working-directory : ${{ github.workspace }}
117
126
run : git clone https://github.com/opentensor/subtensor.git
@@ -121,7 +130,5 @@ jobs:
121
130
run : git checkout devnet-ready
122
131
123
132
- name : Run Bittensor SDK e2e test
124
- working-directory : ${{ github.workspace }}
125
133
run : |
126
- source ${{ github.workspace }}/venv/bin/activate
127
134
LOCALNET_SH_PATH="${{ github.workspace }}/subtensor/scripts/localnet.sh" pytest ${{ matrix.test-file }} -s
0 commit comments