From b7701e555eecaeaf85c8f9d06c398aef56ea9d91 Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 22 Jan 2022 16:16:41 +0300 Subject: [PATCH 1/2] add ci-generate check --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index ea27ed5e2..73bbf4651 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 From 3213f308981a88312d458741e56140bbaee7addc Mon Sep 17 00:00:00 2001 From: Denis Date: Sat, 22 Jan 2022 16:55:00 +0300 Subject: [PATCH 2/2] add step to ci --- .github/workflows/go.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index f4b30c094..37fcd5b5f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -20,6 +20,10 @@ jobs: run: | make ci-linter + - name: Precompiled + run: | + make ci-generate + - name: Test run: | make ci-tests