Skip to content

Commit

Permalink
Added process_kava_dispatch workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-scherbina committed Aug 8, 2024
1 parent 70bf6de commit cf17fc8
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 0 deletions.
100 changes: 100 additions & 0 deletions .github/workflows/process_kava_dispatch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Process Kava Repository Dispatch Event

on:
push:
branches: [ process_kava_dispatch ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: rosetta-kava

- name: "echo"
run: "echo $GITHUB_WORKSPACE"
- name: "ls"
run: "ls -la $GITHUB_WORKSPACE"
- name: "pwd"
run: "pwd"

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: rosetta-kava/go.mod

- name: Cache Go Modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('./rosetta-kava/**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
# - name: Build
# run: make build

# - name: "Clone Kava"
# run: git clone https://github.com/Kava-Labs/kava

- name: Checkout kava
uses: actions/checkout@v4
with:
repository: Kava-Labs/kava
path: kava

- name: "echo"
run: "echo $GITHUB_WORKSPACE"
- name: "ls"
run: "ls -la $GITHUB_WORKSPACE"
- name: "pwd"
run: "pwd"

- name: "build kava"
run: make docker-build
working-directory: ./kava

- name: Checkout kvtool
uses: actions/checkout@v4
with:
repository: Kava-Labs/kvtool
path: kvtool

- name: "build kvtool"
run: make install
working-directory: ./kvtool

- name: "start kvtool"
run: KAVA_TAG=local kvtool t bootstrap

- name: "sleep 30 sec"
run: "sleep 30"

- name: "check if EVM API is available"
run: |
curl -sS -X POST \
--data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' \
-H "Content-Type: application/json" \
http://localhost:8545 | jq
- name: "docker ps"
run: "docker ps"

- name: "docker logs"
run: "docker logs generated-kavanode-1"

# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3

- name: Test Integration
run: KAVA_RPC_URL=http://localhost:26657 NETWORK=kava-local PORT=4000 make test-integration
working-directory: ./rosetta-kava

- name: "docker ps"
run: "docker ps"
if: always()

- name: "docker logs"
run: "docker logs generated-kavanode-1"
if: always()
2 changes: 2 additions & 0 deletions testing/retry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func TestBlockRetry(t *testing.T) {
time.Sleep(time.Duration(rand.Intn(1000)) * time.Millisecond)

for {
time.Sleep(time.Millisecond * 100)

select {
case <-jobCtx.Done():
return
Expand Down

0 comments on commit cf17fc8

Please sign in to comment.