Skip to content

deps(deps): bump tokio from 1.44.2 to 1.45.0 #110

deps(deps): bump tokio from 1.44.2 to 1.45.0

deps(deps): bump tokio from 1.44.2 to 1.45.0 #110

name: Integration Test
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
- ".gitignore"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "LICENSE"
- ".gitignore"
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
testnet:
name: Testnet Validation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Rust
uses: dtolnay/rust-toolchain@nightly
with:
toolchain: nightly
- name: Install protobuf compiler
run: sudo apt-get update && sudo apt-get install -y protobuf-compiler
- name: Cache dependencies
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build -r
- name: Setup testnet
run: cargo run -- testnet --nodes 3 --home nodes
- name: Start nodes and validate
run: |
# Start the nodes in the background
bash spawn.bash --nodes 3 --home nodes &
# Save the PID to kill it later
SPAWN_PID=$!
# Wait for nodes to start and produce some blocks
sleep 30
# Check if logs contain successful block production
if grep -q "height=3" nodes/*/logs/node.log; then
echo "Testnet is producing blocks successfully"
# Kill the spawned process
kill $SPAWN_PID
wait $SPAWN_PID || true
exit 0
else
echo "Testnet failed to produce blocks"
# Kill the spawned process
kill $SPAWN_PID
wait $SPAWN_PID || true
exit 1
fi