diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 315917f..c894a1d 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -27,6 +27,11 @@ jobs: go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.io,direct chown -R root:root /root/.ssh + - name: Setup golangci-lint + run: | + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.61.0 + - name: Lint + run: make lint - name: Build run: make build - name: Test diff --git a/Makefile b/Makefile index 61e9d4a..f54d3c0 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: all build clean prepare-test test ci-test +.PHONY: all build clean lint prepare-test test ci-test BUILD_DIR = ./build TMP_DIR = ./tmp @@ -15,6 +15,9 @@ clean: rm -rf $(TMP_DIR)/* rm -rf *.out +lint: + golangci-lint run + prepare-test: git submodule update --init --remote