Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ulbqb committed Aug 5, 2023
1 parent fc08e04 commit 35940ec
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 37 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/ibc-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,24 @@ on:
branches:
- main
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"

test-fnsa-fnsa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Display go version
run: go version
- name: Checkout
uses: actions/checkout@v3
- name: Test finschia to finschia
run: |
cd ibc_e2e
make test-fnsa-fnsa
make build-docker
make test-fnsa-fnsa-in-docker
test-fnsa-gaia:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Display go version
run: go version
- name: Test finschia to gaia
- name: Checkout
uses: actions/checkout@v3
- name: Test finschia to finschia
run: |
cd ibc_e2e
make test-fnsa-gaia
make build-docker
make test-fnsa-gaia-in-docker
5 changes: 5 additions & 0 deletions ibc_e2e/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM golang:1.20-bullseye

RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y jq
14 changes: 13 additions & 1 deletion ibc_e2e/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ RLY_VERSION := 2.3.1
GAIA_VERSION := 10.0.2
ARCH := $(shell dpkg --print-architecture)
PATH := $(shell pwd)/bin:$(PATH)
MAKE := $(shell which make)
DOCKER := $(shell which docker)
HOME_DIR := $(shell cd .. && pwd)

bin/fnsad:
@mkdir -p bin && \
Expand Down Expand Up @@ -32,10 +35,19 @@ test-fnsa-fnsa: bin/rly bin/fnsad
test-fnsa-gaia: bin/rly bin/fnsad bin/gaiad
@./e2e fnsa-gaia fnsa-0 fnsad 438 gaia-1 gaiad 118 "skip"

test-fnsa-fnsa-in-docker:
@$(DOCKER) run --rm -it -v ${HOME_DIR}:/workspace -w /workspace/ibc_e2e ibc-e2e:latest make test-fnsa-fnsa

test-fnsa-gaia-in-docker:
@$(DOCKER) run --rm -it -v ${HOME_DIR}:/workspace -w /workspace/ibc_e2e ibc-e2e:latest make test-fnsa-gaia

build-docker:
@$(DOCKER) build . -t ibc-e2e:latest

clean-all:
@rm -rf bin data

clean-data:
@rm -rf data

.PHONY: test-fnsa-fnsa test-fnsa-gaia clean-all clean-data
.PHONY: echo test-fnsa-fnsa test-fnsa-gaia clean-all clean-data
2 changes: 0 additions & 2 deletions ibc_e2e/e2e
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ fi
# spin up two ibc enabled chains and add relevant config info for relaying
bash scripts/chainz $CHAIN0_ID $CHAIN0_BIN $CHAIN0_COINID $CHAIN1_ID $CHAIN1_BIN $CHAIN1_COINID "$8"

ps

echo "waiting for blocks..."
sleep 10

Expand Down
11 changes: 0 additions & 11 deletions ibc_e2e/scripts/chainz
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,6 @@ rm -rf $HOME_DIR &> /dev/null
killall fnsad &> /dev/null
killall gaiad &> /dev/null

kill -9 $(lsof -t -i:26657)
kill -9 $(lsof -t -i:26656)
kill -9 $(lsof -t -i:6060)
kill -9 $(lsof -t -i:9090)
kill -9 $(lsof -t -i:26557)
kill -9 $(lsof -t -i:26556)
kill -9 $(lsof -t -i:6061)
kill -9 $(lsof -t -i:9091)

set -e

echo "Generating binary configurations..."
Expand All @@ -68,8 +59,6 @@ mkdir -p $HOME_DIR && cd $HOME_DIR && cd ../

[ -f $HOME_DIR/$CHAIN0_ID.log ] && echo "$CHAIN0_ID initialized. Watch file $HOME_DIR/$CHAIN0_ID.log to see its execution."
[ -f $HOME_DIR/$CHAIN1_ID.log ] && echo "$CHAIN1_ID initialized. Watch file $HOME_DIR/$CHAIN1_ID.log to see its execution."
cat $HOME_DIR/$CHAIN0_ID.log
cat $HOME_DIR/$CHAIN1_ID.log

echo "Generating rly configurations..."
rly --home $RLY_HOME config init
Expand Down

0 comments on commit 35940ec

Please sign in to comment.