From cdd7e5e37bde2cfc5450bdbfbccb2422b3c3e216 Mon Sep 17 00:00:00 2001 From: Devon Bear Date: Thu, 16 May 2024 18:49:52 -0400 Subject: [PATCH] feat(ci): add check to sure repo is `go mod tidy` and `go work sync'd` (#1090) * ree * x * x * x * x * bet --- .github/workflows/pipeline.yml | 1 + .gitmodules | 6 +++--- build/scripts/devtools.mk | 8 ++++++++ contracts/lib/forge-std | 2 +- contracts/lib/solady | 2 +- mod/runtime/go.mod | 1 - 6 files changed, 14 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 2743ec4646..90d4cdd063 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -55,6 +55,7 @@ jobs: - "nilaway" - "markdownlint" - "generate-check" + - "tidy-sync-check" - "test-unit-cover" - "test-unit-fuzz" - "test-forge-cover" diff --git a/.gitmodules b/.gitmodules index df5dbe5d83..3b1332abe1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ -[submodule "contracts/lib/forge-std"] - path = contracts/lib/forge-std - url = https://github.com/foundry-rs/forge-std [submodule "contracts/lib/solady"] path = contracts/lib/solady url = https://github.com/Vectorized/solady +[submodule "contracts/lib/forge-std"] + path = contracts/lib/forge-std + url = https://github.com/foundry-rs/forge-std diff --git a/build/scripts/devtools.mk b/build/scripts/devtools.mk index 501bdae8d9..3dde3b5b0d 100644 --- a/build/scripts/devtools.mk +++ b/build/scripts/devtools.mk @@ -30,6 +30,14 @@ tidy: ## run go mod tidy in all modules yap: ## the yap cave @go run ./mod/node-builder/pkg/utils/yap/yap.go +tidy-sync-check: + @$(MAKE) tidy sync repo-rinse + @if [ -n "$$(git status --porcelain)" ]; then \ + echo "Tidy and sync operations resulted in changes"; \ + git status -s; \ + git diff --exit-code; \ + fi + .PHONY: format build test-unit bet diff --git a/contracts/lib/forge-std b/contracts/lib/forge-std index e4aef94c17..978ac6fadb 160000 --- a/contracts/lib/forge-std +++ b/contracts/lib/forge-std @@ -1 +1 @@ -Subproject commit e4aef94c1768803a16fe19f7ce8b65defd027cfd +Subproject commit 978ac6fadb62f5f0b723c996f64be52eddba6801 diff --git a/contracts/lib/solady b/contracts/lib/solady index 845668aa1a..5e7497c257 160000 --- a/contracts/lib/solady +++ b/contracts/lib/solady @@ -1 +1 @@ -Subproject commit 845668aa1aa61d6a32c65afb0c8a56ee9c7f3440 +Subproject commit 5e7497c2573576157f9ca23460adbbf3081d0176 diff --git a/mod/runtime/go.mod b/mod/runtime/go.mod index c39b6c0097..e6552aa4ca 100644 --- a/mod/runtime/go.mod +++ b/mod/runtime/go.mod @@ -8,7 +8,6 @@ replace ( cosmossdk.io/x/auth => cosmossdk.io/x/auth v0.0.0-20240516114011-e03476679912 cosmossdk.io/x/consensus => cosmossdk.io/x/consensus v0.0.0-20240516114011-e03476679912 cosmossdk.io/x/gov => cosmossdk.io/x/gov v0.0.0-20240516114011-e03476679912 - github.com/berachain/beacon-kit/mod/beacon => ../beacon // Required because private repo, TODO: fix.