deps(deps): bump toml from 0.8.20 to 0.8.22 #109
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |