Skip to content

Commit 09049aa

Browse files
authored
Merge pull request #244 from elezar/fix-tooling-versions
Add CI target to check generated code
2 parents 60dc9cb + 3c56450 commit 09049aa

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/golang.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ jobs:
4040
args: -v --timeout 5m
4141
skip-cache: true
4242

43-
- name: Check golang modules
43+
- name: Golang modules
4444
run: |
4545
make check-modules
4646
make -C deployments/devel check-modules
4747
48+
- name: Generated code
49+
run: |
50+
make -C deployments/devel install-tools
51+
make check-generate
52+
4853
test:
4954
name: Unit test
5055
runs-on: ubuntu-latest

Makefile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ endif
3030
CMDS := $(patsubst ./cmd/%/,%,$(sort $(dir $(wildcard ./cmd/*/))))
3131
CMD_TARGETS := $(patsubst %,cmd-%, $(CMDS))
3232

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

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

115115

116+
check-generate: generate
117+
git diff --exit-code HEAD
118+
116119
generate-deepcopy: .remove-deepcopy
117120
for dir in $(DEEPCOPY_SOURCES); do \
118121
controller-gen \

0 commit comments

Comments
 (0)