From 780de9147aaee3ff05de23eb3f88315e55e9ee6d Mon Sep 17 00:00:00 2001 From: Anubhav Mishra Date: Sat, 17 Jun 2017 15:23:53 -0700 Subject: [PATCH] make targets now filter e2e tests --- Makefile | 8 +++++--- circle.yml | 2 +- scripts/e2e-deps.sh | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 9767c9f3b..46b92b086 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ BUILD_ID := $(shell git rev-parse --short HEAD 2>/dev/null || echo no-commit-id) WORKSPACE := $(shell pwd) +PKG := $(shell go list ./... | grep -v e2e) .PHONY: test @@ -14,18 +15,19 @@ debug: ## Output internal make variables @echo BUILD_ID = $(BUILD_ID) @echo IMAGE_NAME = $(IMAGE_NAME) @echo WORKSPACE = $(WORKSPACE) + @echo PKG = $(PKG) deps: - go get -v $(go list ./... | grep -v e2e) + go get -v $(PKG) build-service: ## Build the main Go service CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v -o atlantis . deps-test: - go get -t $(go list ./... | grep -v e2e) + go get -t $(PKG) test: ## Run tests, coverage reports, and clean (coverage taints the compiled code) - go test -v $(go list ./... | grep -v e2e) + go test -v $(PKG) test-coverage: go test -v ./... -coverprofile=c.out diff --git a/circle.yml b/circle.yml index b6076d3c4..28206d02b 100644 --- a/circle.yml +++ b/circle.yml @@ -34,4 +34,4 @@ test: - sleep 2 # Set ATLANTIS_URL environment variable to be used by atlantis e2e test to create the webhook - echo 'export ATLANTIS_URL=$(curl -s 'http://localhost:4040/api/tunnels' | jq -r '.tunnels[1].public_url') ' >> ~/.circlerc - - cd "${WORKDIR}" && ./scripts/e2e.sh + - cd "${WORKDIR}/e2e" && ./scripts/e2e.sh diff --git a/scripts/e2e-deps.sh b/scripts/e2e-deps.sh index 989eadd86..c083b047a 100755 --- a/scripts/e2e-deps.sh +++ b/scripts/e2e-deps.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo "Preparing to run e2e tests" -mv atlantis e2e/ +mv atlantis ${WORKDIR}/e2e/ # cd into e2e folder cd e2e/