make targets now filter e2e tests

This commit is contained in:
Anubhav Mishra
2017-06-17 15:23:53 -07:00
parent b2ea325cee
commit 780de9147a
3 changed files with 7 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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/