@@ -14,15 +14,21 @@ jobs:
1414 runs-on : ubuntu-latest
1515
1616 steps :
17+ # Install system dependencies
18+ - name : Install system dependencies
19+ run : |
20+ sudo apt-get update
21+ sudo apt-get install -y libusb-1.0-0-dev libudev-dev pkg-config
22+
1723 # Step 1: Checkout the repository
1824 - name : Checkout code
1925 uses : actions/checkout@v3
2026
2127 # Step 2: Set up Python environment
22- - name : Set up Python 3.x
28+ - name : Set up Python 3.11
2329 uses : actions/setup-python@v4
2430 with :
25- python-version : ' 3.x '
31+ python-version : ' 3.11 '
2632
2733 # Step 3: Install pipx (to manage Python tools)
2834 - name : Install pipx
4450 # Start the local testnet with mxpy
4551 mkdir -p ~/localnet && cd ~/localnet
4652 mxpy localnet setup --configfile=${GITHUB_WORKSPACE}/localnet.toml
53+ echo "Localnet setup completed."
54+ echo "Starting localnet..."
4755 nohup mxpy localnet start --configfile=${GITHUB_WORKSPACE}/localnet.toml > localnet.log 2>&1 & echo $! > localnet.pid
48- sleep 120 # Allow time for the testnet to fully start
56+ echo "Localnet started, waiting for it to be fully operational..."
57+
58+ # Allow time for the testnet to fully start
59+ timeout=300
60+ elapsed=0
61+ while ! curl -s http://127.0.0.1:7950/network/config > /dev/null; do
62+ if [ $elapsed -ge $timeout ]; then
63+ echo "Timeout waiting for localnet to start"
64+ cat ~/localnet/localnet.log
65+ exit 1
66+ fi
67+ echo "Waiting for localnet... ($elapsed/$timeout seconds)"
68+ sleep 10
69+ elapsed=$((elapsed + 10))
70+ done
71+
72+ echo "Localnet is ready!"
4973
5074 # Step 6: Install Node.js and dependencies
5175 - name : Set up Node.js environment
0 commit comments