Skip to content

Commit a53c5e4

Browse files
author
Roman
committed
install and run into global python env
1 parent d3c9ef6 commit a53c5e4

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

.github/workflows/pr-checks.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ concurrency:
55
cancel-in-progress: true
66

77
on:
8+
push:
9+
branches:
10+
- master
11+
- staging
12+
813
pull_request:
914
branches:
1015
- master
@@ -14,6 +19,7 @@ on:
1419
jobs:
1520
check-labels:
1621
runs-on: ubuntu-latest
22+
timeout-minutes: 45
1723
outputs:
1824
skip-tests: ${{ contains(github.event.pull_request.labels.*.name, 'skip-bittensor-tests') }}
1925
run-cli-tests: ${{ contains(github.event.pull_request.labels.*.name, 'run-bittensor-cli-tests') }}
@@ -53,11 +59,16 @@ jobs:
5359
components: rustfmt
5460
profile: minimal
5561

56-
- name: Create python env
57-
working-directory: ${{ github.workspace }}
62+
- name: Add wasm32-unknown-unknown target
5863
run: |
59-
python3 -m venv venv
60-
source venv/bin/activate
64+
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
65+
rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
66+
67+
# - name: Create python env
68+
# working-directory: ${{ github.workspace }}
69+
# run: |
70+
# python3 -m venv venv
71+
# source venv/bin/activate
6172

6273
- name: Clone Bittensor SDK repo
6374
working-directory: ${{ github.workspace }}
@@ -67,9 +78,9 @@ jobs:
6778
working-directory: ${{ github.workspace }}/bittensor
6879
run: |
6980
git checkout staging
70-
source ${{ github.workspace }}/venv/bin/activate
71-
python -m pip install --upgrade pip
72-
python -m pip install '.[dev]'
81+
# source ${{ github.workspace }}/venv/bin/activate
82+
python3 -m pip install --upgrade pip
83+
python3 -m pip install '.[dev]'
7384
pip install maturin
7485

7586
- name: Clone bittensor-wallet repo
@@ -85,13 +96,20 @@ jobs:
8596
- name: Build and install Rust Bittensor Wallet package into python virtual environment
8697
working-directory: ${{ github.workspace }}/btwallet
8798
run: |
88-
source ${{ github.workspace }}/venv/bin/activate
99+
# source ${{ github.workspace }}/venv/bin/activate
89100
maturin develop
90101

91-
- name: Add wasm32-unknown-unknown target
102+
- name: Run Bittensor SDK integration tests
103+
working-directory: ${{ github.workspace }}/bittensor
92104
run: |
93-
rustup target add wasm32-unknown-unknown --toolchain stable-x86_64-unknown-linux-gnu
94-
rustup component add rust-src --toolchain stable-x86_64-unknown-linux-gnu
105+
# source ${{ github.workspace }}/venv/bin/activate
106+
python3 -m pytest tests/integration_tests -s
107+
108+
- name: Run Bittensor SDK unit tests
109+
working-directory: ${{ github.workspace }}/bittensor
110+
run: |
111+
# source ${{ github.workspace }}/venv/bin/activate
112+
python3 -m pytest tests/unit_tests -s
95113

96114
- name: Clone Subtensor repo
97115
working-directory: ${{ github.workspace }}
@@ -101,8 +119,10 @@ jobs:
101119
working-directory: ${{ github.workspace }}/subtensor
102120
run: git checkout devnet-ready
103121

104-
- name: Run Bittensor SDK tests
122+
- name: Run Bittensor SDK e2e tests
105123
working-directory: ${{ github.workspace }}/bittensor
106124
run: |
107-
source ${{ github.workspace }}/venv/bin/activate
108-
LOCALNET_SH_PATH="${{ github.workspace }}/subtensor/scripts/localnet.sh" pytest tests -s
125+
# source ${{ github.workspace }}/venv/bin/activate
126+
echo ">>> Files:"
127+
ls "$GITHUB_WORKSPACE/subtensor"
128+
LOCALNET_SH_PATH="${{ github.workspace }}/subtensor/scripts/localnet.sh" python3 -m pytest tests/e2e_tests -s

0 commit comments

Comments
 (0)