Skip to content

Commit

Permalink
fix: qol (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmorency authored May 9, 2024
1 parent 3a343bc commit 35ecd70
Show file tree
Hide file tree
Showing 14 changed files with 56 additions and 25 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.2
GO_VERSION: 1.22.3

jobs:
build:
Expand All @@ -36,7 +36,10 @@ jobs:
env:
GOOS: ${{ matrix.targetos }}
GOARCH: ${{ matrix.arch }}

- name: lint
run: make lint
- name: govulncheck
run: make govulncheck
- name: Compile binary
run: |
go mod download
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:
cancel-in-progress: true

env:
GO_VERSION: 1.22.2
GO_VERSION: 1.22.3

jobs:
analyze:
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 @@ permissions:
packages: write

env:
GO_VERSION: 1.22.2
GO_VERSION: 1.22.3
TAR_PATH: /tmp/manifest-docker-image.tar
IMAGE_NAME: manifest-docker-image

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-bin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

- uses: actions/setup-go@v2
with:
go-version: '1.22.2'
go-version: '1.22.3'

- name: Clean up dist directory
run: rm -rf dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
types: [opened, reopened, synchronize]

env:
GO_VERSION: 1.22.2
GO_VERSION: 1.22.3

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
48 changes: 37 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,15 +166,7 @@ test:
@echo "--> Running tests"
go test -v ./...

test-integration:
@echo "--> Running integration tests"
cd integration; go test -v ./...

.PHONY: test test-integration

#################
### Test ###
#################
.PHONY: test

coverage: ## Run coverage report
@echo "--> Creating GOCOVERDIR"
Expand Down Expand Up @@ -227,7 +219,7 @@ proto-lint:
#################

golangci_lint_cmd=golangci-lint
golangci_version=v1.51.2
golangci_version=v1.58.0

lint:
@echo "--> Running linter"
Expand All @@ -239,4 +231,38 @@ lint-fix:
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
@$(golangci_lint_cmd) run ./... --fix --timeout 15m

.PHONY: lint lint-fix
.PHONY: lint lint-fix

#### FORMAT ####
goimports_version=latest

format-install:
@echo "--> Installing goimports $(goimports_version)"
@go install golang.org/x/tools/cmd/goimports@$(goimports_version)
@echo "--> Installing goimports $(goimports_version) complete"

format: ## Run formatter (goimports)
@echo "--> Running goimports"
$(MAKE) format-install
@find . -name '*.go' -not -name '*.pulsar.go' -not -name '*.pb.go' -exec goimports -w -local github.com/liftedinit/manifest-ledger {} \;

#### GOVULNCHECK ####
govulncheck_version=latest

govulncheck-install:
@echo "--> Installing govulncheck $(govulncheck_version)"
@go install golang.org/x/vuln/cmd/govulncheck@$(govulncheck_version)
@echo "--> Installing govulncheck $(govulncheck_version) complete"

govulncheck: ## Run govulncheck
@echo "--> Running govulncheck"
$(MAKE) govulncheck-install
@govulncheck ./...

#### VET ####

vet: ## Run go vet
@echo "--> Running go vet"
@go vet ./...

.PHONY: vet
2 changes: 1 addition & 1 deletion app/upgrades/noop/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func CreateUpgradeHandler(
configurator module.Configurator,
_ *upgrades.AppKeepers,
) upgradetypes.UpgradeHandler {
return func(ctx context.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return func(ctx context.Context, _ upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) {
return mm.RunMigrations(ctx, configurator, fromVM)
}
}
2 changes: 1 addition & 1 deletion cmd/manifestd/cmd/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func addTestnetFlagsToCmd(cmd *cobra.Command) {
cmd.Flags().String(flags.FlagKeyType, string(hd.Secp256k1Type), "Key signing algorithm to generate keys for")

// support old flags name for backwards compatibility
cmd.Flags().SetNormalizeFunc(func(f *pflag.FlagSet, name string) pflag.NormalizedName {
cmd.Flags().SetNormalizeFunc(func(_ *pflag.FlagSet, name string) pflag.NormalizedName {
if name == flags.FlagKeyAlgorithm {
name = flags.FlagKeyType
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/liftedinit/manifest-ledger

go 1.22.2
go 1.22.3

replace (
// core v0.12 was tagged wrong (SDK v51)
Expand Down
2 changes: 1 addition & 1 deletion go.work
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
go 1.22.2
go 1.22.3

use (
.
Expand Down
2 changes: 1 addition & 1 deletion interchaintest/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/liftedinit/manifest-ledger/interchaintest

go 1.22.2
go 1.22.3

replace (
cosmossdk.io/core => cosmossdk.io/core v0.11.0 // proper SDK v50 version
Expand Down
3 changes: 2 additions & 1 deletion interchaintest/helpers/manifest.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"testing"

sdk "github.com/cosmos/cosmos-sdk/types"
manifesttypes "github.com/liftedinit/manifest-ledger/x/manifest/types"
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v8/ibc"

manifesttypes "github.com/liftedinit/manifest-ledger/x/manifest/types"
)

func ManifestUpdateParams(t *testing.T, ctx context.Context, chain *cosmos.CosmosChain, poaAdmin ibc.Wallet, addressPairs string, automaticInflation string, coinInflationPerYear string, flags ...string) (sdk.TxResponse, error) {
Expand Down
3 changes: 2 additions & 1 deletion interchaintest/mainfest_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"testing"

sdkmath "cosmossdk.io/math"
"github.com/liftedinit/manifest-ledger/interchaintest/helpers"
"github.com/strangelove-ventures/interchaintest/v8"
"github.com/strangelove-ventures/interchaintest/v8/chain/cosmos"
"github.com/strangelove-ventures/interchaintest/v8/testreporter"
Expand All @@ -16,6 +15,8 @@ import (
"go.uber.org/zap/zapcore"
"go.uber.org/zap/zaptest"

"github.com/liftedinit/manifest-ledger/interchaintest/helpers"

sdk "github.com/cosmos/cosmos-sdk/types"
)

Expand Down
2 changes: 1 addition & 1 deletion x/manifest/client/cli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func GetCmdParams() *cobra.Command {
Use: "params",
Short: "Show all module params",
Args: cobra.ExactArgs(0),
RunE: func(cmd *cobra.Command, args []string) error {
RunE: func(cmd *cobra.Command, _ []string) error {
clientCtx, err := client.GetClientQueryContext(cmd)
if err != nil {
return err
Expand Down

0 comments on commit 35ecd70

Please sign in to comment.