diff --git a/.github/issue_labeler.yml b/.github/issue_labeler.yml deleted file mode 100644 index cd0e254..0000000 --- a/.github/issue_labeler.yml +++ /dev/null @@ -1,2 +0,0 @@ -needs-triage: # if no label is set then set triage - - '' diff --git a/.github/pr_labeler.yml b/.github/pr_labeler.yml deleted file mode 100644 index b646f19..0000000 --- a/.github/pr_labeler.yml +++ /dev/null @@ -1,2 +0,0 @@ -"C:Rosetta": - - /**/* \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b7409f..4ce9078 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,9 +37,6 @@ jobs: **/go.sum **/Makefile Makefile - ################### - #### Build App #### - ################### - name: Build if: env.GIT_DIFF run: GOARCH=${{ matrix.go-arch }} make build @@ -48,4 +45,4 @@ jobs: ################### - name: Build Rosetta if: env.GIT_DIFF - run: GOARCH=${{ matrix.go-arch }} make rosetta \ No newline at end of file + run: GOARCH=${{ matrix.go-arch }} make build \ No newline at end of file diff --git a/.github/workflows/pr_labeler.yml b/.github/workflows/pr_labeler.yml deleted file mode 100644 index 885d8b4..0000000 --- a/.github/workflows/pr_labeler.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: "Pull Request Labeler" -on: - - pull_request_target - -permissions: - contents: read - -jobs: - labeler: - permissions: - contents: read # for actions/labeler to determine modified files - pull-requests: write # for actions/labeler to add labels to PRs - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@main - with: - configuration-path: .github/pr_labeler.yml - repo-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/rosetta-cli-test.yaml b/.github/workflows/rosetta-cli-test.yaml index f98986b..3d4ce1c 100644 --- a/.github/workflows/rosetta-cli-test.yaml +++ b/.github/workflows/rosetta-cli-test.yaml @@ -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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c068d55..77b092d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 \ No newline at end of file diff --git a/Makefile b/Makefile index bf1c812..b3f53c4 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 ### diff --git a/README.md b/README.md index 936666f..de74d98 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/scripts/simapp-start-node.sh b/scripts/simapp-start-node.sh new file mode 100644 index 0000000..b046546 --- /dev/null +++ b/scripts/simapp-start-node.sh @@ -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 \ No newline at end of file