diff --git a/.cirrus.yml b/.cirrus.yml index 9375737f..754a0792 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -52,8 +52,9 @@ validate_task: image: '${SKOPEO_CIDEV_CONTAINER_FQIN}' cpu: 4 memory: 8 - script: | - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2 + setup_script: | + make tools + test_script: | make validate-local make vendor && hack/tree_status.sh @@ -92,7 +93,7 @@ osx_task: export PATH=$GOPATH/bin:$PATH brew update brew install gpgme go go-md2man - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.52.2 + make tools test_script: | export PATH=$GOPATH/bin:$PATH go version diff --git a/Makefile b/Makefile index d9f92581..46aa4d29 100644 --- a/Makefile +++ b/Makefile @@ -181,6 +181,11 @@ install-completions: completions shell: $(CONTAINER_RUN) bash +tools: + if [ ! -x "$(GOBIN)/golangci-lint" ]; then \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.52.2 ; \ + fi + check: validate test-unit test-integration test-system test-integration: