diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index da6202e7..04a8fd5c 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -152,3 +152,17 @@ jobs: - name: Verify generate command run: | make verify-generate + verify-go-mod: + name: Verify go.mod + runs-on: ubuntu-latest + steps: + - name: Set up Go 1.21.x + uses: actions/setup-go@v4 + with: + go-version: 1.21.x + id: go + - name: Check out code + uses: actions/checkout@v4 + - name: Verify generate command + run: | + make verify-go-mod diff --git a/make/verify.mk b/make/verify.mk index a0efd7c1..bdac7e11 100644 --- a/make/verify.mk +++ b/make/verify.mk @@ -24,3 +24,8 @@ verify-tidy: fmt ## Verify tidy update. .PHONY: verify-generate verify-generate: generate ## Verify generate update. git diff --exit-code ./api ./controllers + +.PHONY: verify-go-mod +verify-go-mod: ## Verify go.mod matches source code + go mod tidy + git diff --exit-code ./go.mod