From c6ae4a4d7d2230f238bae7ea1bbc0699ac23757a Mon Sep 17 00:00:00 2001 From: Philipp Hinteregger Date: Wed, 2 Nov 2022 14:20:05 +0100 Subject: [PATCH] ci: Improve CI pipeline performance (#270) --- .github/workflows/CI.yaml | 6 ------ operator/Makefile | 4 ++-- scheduler/Makefile | 2 +- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml index 66742fe331..edb3d4d558 100644 --- a/.github/workflows/CI.yaml +++ b/.github/workflows/CI.yaml @@ -63,10 +63,6 @@ jobs: name: Compile needs: prepare_ci_run runs-on: ubuntu-22.04 - env: - BRANCH: ${{ needs.prepare_ci_run.outputs.BRANCH }} - DATETIME: ${{ needs.prepare_ci_run.outputs.DATETIME }} - GIT_SHA: ${{ needs.prepare_ci_run.outputs.GIT_SHA }} strategy: matrix: config: @@ -87,12 +83,10 @@ jobs: cache-dependency-path: '${{ matrix.config.folder }}go.sum' - name: Go vet - if: matrix.config.name != 'functions-runtime' working-directory: ./${{ matrix.config.folder }} run: go vet ./... - name: Go fmt - if: matrix.config.name != 'functions-runtime' working-directory: ./${{ matrix.config.folder }} run: go fmt ./... diff --git a/operator/Makefile b/operator/Makefile index 34bd67d82b..7f22be61ed 100644 --- a/operator/Makefile +++ b/operator/Makefile @@ -76,12 +76,12 @@ vet: ## Run go vet against code. go vet ./... .PHONY: test -test: manifests generate fmt vet envtest ## Run tests. +test: manifests envtest ## Run tests. KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) -p path)" go test ./... -coverprofile cover.out ##@ Build .PHONY: build -build: generate fmt vet ## Build manager binary. +build: generate ## Build manager binary. $(COMMONENVVAR) $(BUILDENVVAR) go build -ldflags '-w -X main.gitCommit=$(HASH) -X main.buildTime=$(BUILD_TIME) -X main.buildVersion=$(TAG)' -o bin/manager main.go .PHONY: run diff --git a/scheduler/Makefile b/scheduler/Makefile index 2b66a1fc22..5f7e2a4f31 100644 --- a/scheduler/Makefile +++ b/scheduler/Makefile @@ -75,7 +75,7 @@ vet: ## Run go vet against code. go vet ./... .PHONY: test -test: fmt vet ## Run tests. +test: ## Run tests. go test ./... -coverprofile cover.out .PHONY: kustomize