diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 898c17151b..eda75bad43 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,8 +53,8 @@ jobs: skip-pkg-cache: true args: --timeout 5m --skip-dirs pkg/gen --skip-files "zz_generated.deepcopy.go$" - tidy: - name: Tidy + codegen: + name: Codegen runs-on: ubuntu-latest steps: - name: Checkout @@ -65,6 +65,8 @@ jobs: go-version: 1.16 - name: go mod tidy run: make go-mod-tidy + - name: Codegen checks + run: make check-codegen mocks: name: Mocks diff --git a/Makefile b/Makefile index 6ff3260822..a66c90e04c 100644 --- a/Makefile +++ b/Makefile @@ -123,8 +123,13 @@ check-mocks: @go run ./mockspec/generate.go @git diff --exit-code || { echo "----- Please commit the changes made by 'go run ./mockspec/generate.go' -----"; exit 1; } +.PHONY: check-codegen +check-codegen: + @./codegen/gen-crd-client.sh + @git diff --exit-code || { echo "----- Please commit the changes made by './codegen/gen-crd-client.sh' -----"; exit 1; } + .PHONY: go-checks -go-checks: go-lint go-fmt go-mod-tidy check-mocks +go-checks: go-lint go-fmt go-mod-tidy check-mocks check-codegen .PHONY: go-vet go-vet: