This repository has been archived by the owner on Aug 2, 2024. It is now read-only.
creating a local testnet with multiple nodes fails using only flags #2
Workflow file for this run
This file contains 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: Task - Integration Tests | ||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
jobs: | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
env: | ||
BINARY_PATH: ../target/production/madara | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "cache" | ||
save-if: false | ||
- name: setup configs | ||
run: | | ||
target/production/madara setup --from-local ./configs/ --chain=local --base-path /tmp/alice | ||
target/production/madara setup --from-local ./configs/ --chain=local --base-path /tmp/node1 | ||
target/production/madara purge-chain --base-path /tmp/alice --chain local -y | ||
target/production/madara purge-chain --base-path /tmp/node1 --chain local -y | ||
- name: Run Validator and nodes | ||
n: | | ||
target/production/madara \ | ||
--base-path /tmp/alice \ | ||
--chain local \ | ||
--alice \ | ||
--node-key 0000000000000000000000000000000000000000000000000000000000000001 \ | ||
--validator > validator_output.txt 2>&1 & | ||
validator_pid=$! | ||
target/production/madara \ | ||
--chain local \ | ||
--bootnodes /ip4/127.0.0.1/tcp/30333/p2p/12D3KooWEyoppNCUx8Yx66oV9fJnriXwCcXwDDUA2kj6vnc6iDEp \ | ||
--base-path /tmp/node1 \ | ||
--rpc-port 9946 > node_output.txt 2>&1 & | ||
node_pid=$! | ||
sleep 20 | ||
specific_message="1 peers" | ||
if ! grep -q "$specific_message" validator_output.txt; then | ||
echo "Node failed to connect to validator" | ||
exit 1 | ||
fi | ||
echo "Validator successfully connected." |