mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-03 22:28:49 +00:00
make targets now filter e2e tests
This commit is contained in:
8
Makefile
8
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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/
|
||||
|
||||
Reference in New Issue
Block a user