Skip to content

Commit 9ea69a2

Browse files
committed
use single node for testing
1 parent 9734e48 commit 9ea69a2

File tree

2 files changed

+9
-16
lines changed

2 files changed

+9
-16
lines changed

.github/workflows/contract-tests.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,10 @@ jobs:
4848
run: |
4949
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get update
5050
sudo DEBIAN_FRONTEND=noninteractive NEEDRESTART_MODE=a apt-get install -y --no-install-recommends -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" build-essential clang curl libssl-dev llvm libudev-dev protobuf-compiler nodejs pkg-config
51-
51+
sudo rustup component add rust-src
52+
sudo cargo install cargo-contract
53+
sudo cargo build --release -p node-subtensor --features fast-runtime
54+
sudo cd contract-tests/bittensor
5255
- name: Run tests
5356
uses: nick-fields/retry@v3
5457
with:

contract-tests/run-ci.sh

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,10 @@
22

33
echo "start run-ci.sh"
44

5-
cd contract-tests
6-
7-
cd bittensor
8-
9-
rustup component add rust-src
10-
cargo install cargo-contract
11-
cargo contract build --release
12-
13-
cd ../..
14-
15-
scripts/localnet.sh &>/dev/null &
5+
target/release/node-subtensor --dev --tmp --one &>/dev/null &
166

177
i=1
18-
while [ $i -le 2000 ]; do
8+
while [ $i -le 60 ]; do
199
if nc -z localhost 9944; then
2010
echo "node subtensor is running after $i seconds"
2111
break
@@ -25,11 +15,11 @@ while [ $i -le 2000 ]; do
2515
done
2616

2717
# port not available exit with error
28-
if [ "$i" -eq 2000 ]; then
18+
if [ "$i" -eq 60 ]; then
2919
exit 1
3020
fi
3121

32-
sleep 10
22+
sleep 2
3323

3424
if ! nc -z localhost 9944; then
3525
echo "node subtensor exit, port not available"
@@ -43,7 +33,7 @@ npm i -g polkadot-api
4333

4434
bash get-metadata.sh
4535

46-
sleep 5
36+
sleep 2
4737

4838
yarn install --frozen-lockfile
4939

0 commit comments

Comments
 (0)