Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Docker Integration Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

defaults:
run:
shell: bash

jobs:

build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18

- name: Start 4 node docker cluster
run: make clean && make docker-cluster-start &

- name: Wait for docker cluster to start
run: |
until [ $(cat build/generated/launch.complete |wc -l) = 4 ]
do
sleep 10
done

- name: Verify there are 4 validators running
run: |
NUM_VALIDATORS=$(docker exec -i sei-node0 build/seid q tendermint-validator-set |grep address |wc -l)
if [[ "$NUM_VALIDATORS" -eq 4 ]];
then
echo "Number validators is correct: $NUM_VALIDATORS"
else
exit 1
fi

- name: Verify block height is keep increasing
run: |
HEIGHT_1=$(docker exec -i sei-node0 build/seid status |jq -r .SyncInfo.latest_block_height)
echo $HEIGHT_1
sleep 15
HEIGHT_2=$(docker exec -i sei-node0 build/seid status |jq -r .SyncInfo.latest_block_height)
echo $HEIGHT_2
if [ "$HEIGHT_1" -ge "$HEIGHT_2" ];
then
exit 1
fi
9 changes: 8 additions & 1 deletion docker/localnode/scripts/step5_start_sei.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ mkdir -p $LOG_DIR
echo "Starting the sei chain daemon"
cp build/generated/genesis-sei.json ~/.sei/config/genesis.json
./build/seid start --chain-id sei > "$LOG_DIR"/seid-$NODE_ID.log 2>&1 &
echo "Done" >> build/generated/launch.complete

echo "Server started successfully! Check your logs under $LOG_DIR/"
tail -f /dev/null

until [ $(cat build/generated/launch.complete |wc -l) = 4 ]
do
sleep 5
done

tail -f /dev/null