From 0dae3d6e886dd2007ca447c85582a7faabf72eb1 Mon Sep 17 00:00:00 2001 From: Evans Mungai Date: Thu, 7 Aug 2025 12:34:26 +0100 Subject: [PATCH] chore: check if go modules are tidy before build Signed-off-by: Evans Mungai --- .github/workflows/build-test.yml | 2 ++ Makefile | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 11a5c49ec..0c3ff6596 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -28,6 +28,8 @@ jobs: check-latest: true - name: Test source headers are present run: make test-source-headers + - name: Check if go mod is tidy + run: go mod tidy -diff - name: Run unit tests run: make test-coverage - name: Test build diff --git a/Makefile b/Makefile index 0785fdb2e..6624c12bb 100644 --- a/Makefile +++ b/Makefile @@ -246,3 +246,7 @@ info: @echo "Git Tag: ${GIT_TAG}" @echo "Git Commit: ${GIT_COMMIT}" @echo "Git Tree State: ${GIT_DIRTY}" + +.PHONY: tidy +tidy: + go mod tidy