Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ci-generate check #1197

Merged
merged 3 commits into from Jan 24, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion Makefile
Expand Up @@ -24,7 +24,7 @@ docs:
cd ./cmd/makedocs && go run main.go

ci:
@if [ "$(TEST_SUITE)" = "linter" ]; then make ci-linter; else make ci-tidy; make ci-tests; fi
@if [ "$(TEST_SUITE)" = "linter" ]; then make ci-linter; else make ci-tidy; make ci-generate; make ci-tests; fi

ci-tidy:
go mod tidy
Expand All @@ -35,6 +35,10 @@ ci-tidy:
ci-tests:
GOCRITIC_EXTERNAL_TESTS=1 go test -v -race -count=1 -coverprofile=coverage.out ./...

ci-generate:
go generate ./...
git diff --exit-code --quiet || (echo "Please run 'go generate ./...' to update precompiled rules."; false)

ci-linter:
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOPATH_DIR)/bin v1.30.0
@$(GOPATH_DIR)/bin/golangci-lint run -v
Expand Down