Skip to content

Commit

Permalink
added makefile step for test-rosetta-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
bizk committed Jan 3, 2024
1 parent 5e4d226 commit 843227d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 35 deletions.
2 changes: 0 additions & 2 deletions .github/issue_labeler.yml

This file was deleted.

2 changes: 0 additions & 2 deletions .github/pr_labeler.yml

This file was deleted.

5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@ jobs:
**/go.sum
**/Makefile
Makefile
###################
#### Build App ####
###################
- name: Build
if: env.GIT_DIFF
run: GOARCH=${{ matrix.go-arch }} make build
Expand All @@ -48,4 +45,4 @@ jobs:
###################
- name: Build Rosetta
if: env.GIT_DIFF
run: GOARCH=${{ matrix.go-arch }} make rosetta
run: GOARCH=${{ matrix.go-arch }} make build
18 changes: 0 additions & 18 deletions .github/workflows/pr_labeler.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/rosetta-cli-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
- name: Check blockchain status
run: curl localhost:26657/status
- name: Build Rosetta
run: go mod tidy && make rosetta && make plugin
run: go mod tidy && make build && make plugin
- name: Run Rosetta service
run: ./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090" &
- name: Wait for rosetta boot up for 30 secs
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,4 @@ jobs:
- name: tests
if: env.GIT_DIFF
run: |
make plugin && make test
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic ./...
make plugin && make test
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
#!/usr/bin/make -f

all: build

rosetta:
go build -mod=readonly ./cmd/rosetta
all: build plugin test test-rosetta-ci

build:
go build -mod=readonly ./cmd/rosetta
Expand All @@ -12,7 +9,14 @@ plugin:
cd plugins/cosmos-hub && make plugin

test:
go test -mod=readonly ./...
go test -mod=readonly -timeout 30m -coverprofile=coverage.out -covermode=atomic ./...

test-rosetta-ci:
sh ./scripts/simapp-start-node.sh &
go mod tidy && make build && make plugin
./rosetta --blockchain "cosmos" --network "cosmos" --tendermint "tcp://localhost:26657" --addr "localhost:8080" --grpc "localhost:9090" &
sleep 30
sh ./tests/rosetta-cli/rosetta-cli-test.sh

###############################################################################
### Linting ###
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Install Rosetta standalone server with the following command:
go install github.com/cosmos/rosetta
```

Alternatively, for building from source, simply run `make rosetta`. The binary will be located in the root folder.
Alternatively, for building from source, simply run `make build`. The binary will be located in the root folder.

### Native - As a node command

Expand Down
10 changes: 10 additions & 0 deletions scripts/simapp-start-node.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
git clone https://github.com/cosmos/cosmos-sdk.git
# shellcheck disable=SC2164
cd cosmos-sdk
make build
export SIMD_BIN=./build/simd
make init-simapp --dry-run
$SIMD_BIN start
until curl --output /dev/null --silent --head --fail http://localhost:26657/health; do
sleep 1
done

0 comments on commit 843227d

Please sign in to comment.