Skip to content

Commit

Permalink
Fix proto/lint/e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
teddyding committed Oct 1, 2024
1 parent c8beeea commit 7be6e39
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.21"
go-version: "1.22"

- uses: actions/checkout@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: '1.22'
- uses: actions/checkout@v4
- uses: technote-space/get-diff-action@v6
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ name: Golang Linter
#
# To run this locally, simply run `make lint` from the root of the repo.

# Effectively disable this temporarily on the fork repo. Lint has been broken across
# the repo for a while, and the best way to fix is to upgrade to latest canonical version.
on:
pull_request:
# pull_request:
# merge_group:
push:
branches:
- v0.38.x
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,8 @@ mockery:

#? check-proto-deps: Check protobuf deps
check-proto-deps:
ifeq (,$(shell which protoc-gen-gogofaster))
@go install github.com/cosmos/gogoproto/protoc-gen-gogofaster@latest
ifeq (,$(shell which protoc-gen-gocosmos))
@go install github.com/cosmos/gogoproto/protoc-gen-gocosmos@latest
endif
.PHONY: check-proto-deps

Expand All @@ -145,7 +145,7 @@ proto-gen: check-proto-deps
#? proto-lint: Lint protobuf files
proto-lint: check-proto-deps
@echo "Linting Protobuf files"
@go run github.com/bufbuild/buf/cmd/buf lint
@go run github.com/bufbuild/buf/cmd/buf@latest lint
.PHONY: proto-lint

#? proto-format: Format protobuf files
Expand Down Expand Up @@ -327,12 +327,12 @@ build_c-amazonlinux:
#? localnet-start: Run a 4-node testnet locally
localnet-start: localnet-stop build-docker-localnode
@if ! [ -f build/node0/config/genesis.json ]; then docker run --rm -v $(CURDIR)/build:/cometbft:Z cometbft/localnode testnet --config /etc/cometbft/config-template.toml --o . --starting-ip-address 192.167.10.2; fi
docker-compose up
docker compose up
.PHONY: localnet-start

#? localnet-stop: Stop testnet
localnet-stop:
docker-compose down
docker compose down
.PHONY: localnet-stop

#? build-contract-tests-hooks: Build hooks for dredd, to skip or add information on some steps
Expand Down
1 change: 1 addition & 0 deletions abci/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion buf.gen.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
version: v1
plugins:
- name: gogofaster
- name: gocosmos
out: ./proto/
opt:
- Mgoogle/protobuf/timestamp.proto=github.com/cosmos/gogoproto/types
Expand Down
13 changes: 0 additions & 13 deletions buf.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions proto/dydxcometbft/clob/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ syntax = "proto3";
package dydxcometbft.clob;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "dydxcometbft/clob/order.proto";
import "dydxcometbft/clob/matches.proto";

// this line is used by starport scaffolding # proto/tx/import

Expand Down
1 change: 1 addition & 0 deletions proto/tendermint/rpc/grpc/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions rpc/grpc/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions test/e2e/pkg/infra/docker/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,21 @@ services:
// ExecCompose runs a Docker Compose command for a testnet.
func ExecCompose(ctx context.Context, dir string, args ...string) error {
return exec.Command(ctx, append(
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
args...)...)
}

// ExecCompose runs a Docker Compose command for a testnet and returns the command's output.
func ExecComposeOutput(ctx context.Context, dir string, args ...string) ([]byte, error) {
return exec.CommandOutput(ctx, append(
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
args...)...)
}

// ExecComposeVerbose runs a Docker Compose command for a testnet and displays its output.
func ExecComposeVerbose(ctx context.Context, dir string, args ...string) error {
return exec.CommandVerbose(ctx, append(
[]string{"docker-compose", "-f", filepath.Join(dir, "docker-compose.yml")},
[]string{"docker", "compose", "-f", filepath.Join(dir, "docker-compose.yml")},
args...)...)
}

Expand Down

0 comments on commit 7be6e39

Please sign in to comment.