Skip to content

Commit a20989b

Browse files
authoredApr 1, 2024··
Add verify (tidy/lint) target (#1247)
Added a verify target, to which other checks can be added. Added lint and tidy to the verify target. This will be used during github workflows/CI to make sure everything is "tidied". Updated the `sanity` check to use this verify target.
1 parent 51ac823 commit a20989b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed
 

‎.github/workflows/sanity.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ jobs:
2020
go-version-file: "go.mod"
2121
- name: Install goimports
2222
run: go install golang.org/x/tools/cmd/goimports@latest
23-
- name: Run sanity checks
24-
run: make lint && git diff --exit-code
23+
- name: Run verify checks
24+
run: make verify

‎Makefile

+9
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,15 @@ static: build
6363
unit:
6464
$(GO) test -coverprofile=coverage.out $(SPECIFIC_UNIT_TEST) $(SPECIFIC_SKIP_UNIT_TEST) $(TAGS) $(TEST_RACE) -count=1 ./pkg/... ./alpha/...
6565

66+
.PHONY: tidy
67+
tidy:
68+
go mod tidy
69+
go mod verify
70+
71+
.PHONY: verify
72+
verify: tidy lint
73+
git diff --exit-code
74+
6675
.PHONY: sanity-check
6776
sanity-check:
6877
# Build a container with the most recent binaries for this project.

0 commit comments

Comments
 (0)
Please sign in to comment.