diff --git a/.circleci/config.yml b/.circleci/config.yml index 3418e0eb7..eb459137e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,37 +6,39 @@ executors: - image: circleci/golang:1.14 working_directory: /go/src/github.com/lacework/go-sdk - jobs: unit-test: executor: go-executor steps: - checkout - run: make prepare + - run: make lint - run: make test + - run: make fmt-check + - run: make imports-check build-cli: executor: go-executor steps: - checkout - - run: make prepare - run: make build-cli-cross-platform + - persist_to_workspace: + root: bin + paths: + - lacework-cli-* integration-test: executor: go-executor steps: - checkout - - run: make prepare - - run: make integration + - attach_workspace: + at: bin + - run: make integration-only workflows: build-and-test: jobs: - unit-test - build-cli - - hold: - type: approval + - integration-test: requires: - unit-test - build-cli - - integration-test: - requires: - - hold diff --git a/Makefile b/Makefile index dd4f5175a..a2d717748 100644 --- a/Makefile +++ b/Makefile @@ -17,7 +17,9 @@ prepare: install-tools go-vendor test: go test -v -cover -coverprofile=$(COVERAGEOUT) $(shell go list ./... | grep -v integration) -integration: build-cli-cross-platform +integration: build-cli-cross-platform integratoin-only + +integration-only: PATH=$(PWD)/bin:${PATH} go test -v github.com/lacework/go-sdk/integration coverage: test