Skip to content

Commit

Permalink
Merge pull request #244 from elezar/fix-tooling-versions
Browse files Browse the repository at this point in the history
Add CI target to check generated code
  • Loading branch information
elezar authored Mar 6, 2025
2 parents 60dc9cb + 3c56450 commit 09049aa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/golang.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ jobs:
args: -v --timeout 5m
skip-cache: true

- name: Check golang modules
- name: Golang modules
run: |
make check-modules
make -C deployments/devel check-modules
- name: Generated code
run: |
make -C deployments/devel install-tools
make check-generate
test:
name: Unit test
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ endif
CMDS := $(patsubst ./cmd/%/,%,$(sort $(dir $(wildcard ./cmd/*/))))
CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS))

CHECK_TARGETS := golangci-lint
CHECK_TARGETS := golangci-lint check-generate
MAKE_TARGETS := binaries build build-image check fmt lint-internal test examples cmds coverage generate vendor check-modules $(CHECK_TARGETS)

TARGETS := $(MAKE_TARGETS) $(CMD_TARGETS)
Expand Down Expand Up @@ -113,6 +113,9 @@ generate-crds: generate-deepcopy .remove-crds
rm -rf $(CURDIR)/deployments/helm/tmp_crds


check-generate: generate
git diff --exit-code HEAD

generate-deepcopy: .remove-deepcopy
for dir in $(DEEPCOPY_SOURCES); do \
controller-gen \
Expand Down

0 comments on commit 09049aa

Please sign in to comment.