Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3830 from shashankram/codegen-check
Browse files Browse the repository at this point in the history
codegen: add build target and CI check
  • Loading branch information
shashankram authored Jul 22, 2021
2 parents 6f4fd21 + 416505a commit a407806
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a407806

Please sign in to comment.