diff --git a/Makefile b/Makefile index 9a92155f..dfc2429c 100644 --- a/Makefile +++ b/Makefile @@ -35,11 +35,18 @@ checkcoverage: go test -cover ${GO_PACKAGE_PREFIX}/... -coverprofile=coverage.out go tool cover -html=coverage.out +.PHONY: llint +llint: + @if [ ! -z "${CI_ONLY}" ]; \ + then echo 1; \ + fi + .PHONY: lint lint: - @if ! $(gopath)/bin/golangci-lint --version &>/dev/null; then \ + @if [ ! -z "${CI_ONLY}" ]; then \ echo "Installing linters..."; \ curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(gopath)/bin v1.55.2; \ + export GOLANGCI_LINT_CACHE=/tmp/.golangci-lint fi @$(gopath)/bin/golangci-lint run --deadline=10m --tests --disable-all \ --enable=misspell \ diff --git a/entrypoint.sh b/entrypoint.sh index 04c467f7..12dd52e9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -3,6 +3,7 @@ cd /home/clr/mixer-tools run_precheck() { make && sudo -E make install + export CI_ONLY=1 make lint && make check }