Skip to content

Commit

Permalink
added workflow and command
Browse files Browse the repository at this point in the history
  • Loading branch information
bizk committed Sep 18, 2023
1 parent c733fdc commit 4a531b7
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 5 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/rosetta-cli-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: rosetta-cli-test

on:
push:
branches:
- main
- release/**
pull_request:
merge_group:

permissions:
contents: read

jobs:
run-simapp:
runs-on: ubuntu-latest
steps:
- name: Get cosmos-sdk repo
uses: actions/checkout@v3
with:
repository: cosmos/cosmos-sdk
ref: main
- name: set up simapp
run: make build && export SIMD_BIN=./build/simd && make init-simapp && ./build/simd start && curl localhost:26657/status &
- name: Sleep for 2 minutes
run: sleep 120s
shell: bash
- name: review
run: curl localhost:26657/status
- name: Build Rosetta
run: go mod tidy && make rosetta && make plugin && ./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090 &"
- name: Rosetta-cli test
run: make rosetta-cli
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,10 @@ lint-fix:
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@./scripts/go-lint-all.bash --fix

.PHONY: all build rosetta test lint lint-fix
.PHONY: all build rosetta test lint lint-fix

docker:
docker build . --tag rosetta

rosetta-cli:
rosetta-cli check:data --configuration-file ./configs/rosetta-cli.json
5 changes: 1 addition & 4 deletions plugins/cosmos-hub/makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
#!/usr/bin/make -f

plugin:
go build -buildmode=plugin -o main.so main.go

docker:
docker build . --tag rosetta
go build -buildmode=plugin -o main.so main.go
39 changes: 39 additions & 0 deletions tests/config/rosetta-cli.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"network": {
"blockchain": "cosmos",
"network": "cosmos"
},
"online_url":"http://localhost:8080",
"data_directory":"",
"http_timeout":10,
"max_retries":5,
"retry_elapsed_time":0,
"max_online_connections":120,
"max_sync_concurrency":64,
"tip_delay":300,
"max_reorg_depth":100,
"log_configuration":false,
"compression_disabled":false,
"data":{
"active_reconciliation_concurrency":16,
"inactive_reconciliation_concurrency":4,
"inactive_reconciliation_frequency":250,
"log_blocks":true,
"log_transactions":false,
"log_balance_changes":false,
"log_reconciliations":false,
"ignore_reconciliation_error":false,
"reconciliation_disabled":true,
"reconciliation_drain_disabled":false,
"inactive_discrepancy_search_disabled":false,
"balance_tracking_disabled":false,
"coin_tracking_disabled":false,
"status_port":9090,
"results_output_file":"",
"initial_balance_fetch_disabled":false,
"end_conditions": {
"index": 1800
}
},
"construction":null
}

0 comments on commit 4a531b7

Please sign in to comment.