Skip to content

Commit

Permalink
Add verify (tidy/lint) target (#1247)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tmshort authored Apr 1, 2024
1 parent 51ac823 commit a20989b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sanity.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@ jobs:
go-version-file: "go.mod"
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Run sanity checks
run: make lint && git diff --exit-code
- name: Run verify checks
run: make verify
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ static: build
unit:
$(GO) test -coverprofile=coverage.out $(SPECIFIC_UNIT_TEST) $(SPECIFIC_SKIP_UNIT_TEST) $(TAGS) $(TEST_RACE) -count=1 ./pkg/... ./alpha/...

.PHONY: tidy
tidy:
go mod tidy
go mod verify

.PHONY: verify
verify: tidy lint
git diff --exit-code

.PHONY: sanity-check
sanity-check:
# Build a container with the most recent binaries for this project.
Expand Down

0 comments on commit a20989b

Please sign in to comment.