From 09a28f005621046f863247168392777c50e19431 Mon Sep 17 00:00:00 2001 From: Adam Janikowski <12255597+ajanikow@users.noreply.github.com> Date: Mon, 20 Feb 2023 07:09:13 +0100 Subject: [PATCH] [Improvement] Reduce CI on Commit Travis runs (#1249) --- .travis.yml | 15 +++++++++------ CHANGELOG.md | 1 + Makefile | 9 ++++++--- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3070fe0f..2a08c1e73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,10 +8,13 @@ go_import_path: github.com/arangodb/kube-arangodb env: - GO111MODULES=off -install: - - make init - script: - - make license-verify license-range-verify fmt-verify linter - - make run-unit-tests - - make bin \ No newline at end of file + - | + if [ "$TRAVIS_PULL_REQUEST" != "false" ] || [ ! -z "$ALWAYS" ]; then + make init + make license-verify license-range-verify fmt-verify linter + make run-unit-tests + make bin + else + make vendor tools-min fmt-verify linter + fi \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c16defab..1e0368201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - (Feature) SilentRotation High plan - (Improvement) Update arangosync-client package for new API capabilities and better HTTP handling - (Maintenance) Fix generated license dates +- (Improvement) Reduce CI on Commit Travis runs ## [1.2.24](https://github.com/arangodb/kube-arangodb/tree/1.2.24) (2023-01-25) - (Bugfix) Fix deployment creation on ARM64 diff --git a/Makefile b/Makefile index 6b833f2a6..a3aa1d7d7 100644 --- a/Makefile +++ b/Makefile @@ -493,16 +493,19 @@ tidy: deps-reload: tidy init .PHONY: init -init: tools update-generated $(BIN) vendor +init: vendor tools update-generated $(BIN) -.PHONY: tools -tools: update-vendor +.PHONY: tools-min +tools-min: update-vendor @echo ">> Fetching golangci-lint linter" @GOBIN=$(GOPATH)/bin go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.1 @echo ">> Fetching goimports" @GOBIN=$(GOPATH)/bin go install golang.org/x/tools/cmd/goimports@0bb7e5c47b1a31f85d4f173edc878a8e049764a5 @echo ">> Fetching license check" @GOBIN=$(GOPATH)/bin go install github.com/google/addlicense@6d92264d717064f28b32464f0f9693a5b4ef0239 + +.PHONY: tools +tools: tools-min @echo ">> Fetching gci" @GOBIN=$(GOPATH)/bin go install github.com/daixiang0/gci@v0.3.0 @echo ">> Downloading protobuf compiler..."