forked from fauna/faunadb-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (23 loc) · 830 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
RUNTIME_IMAGE ?= golang:1.9
DOCKER_RUN_FLAGS = -it --rm
ifdef FAUNA_ROOT_KEY
DOCKER_RUN_FLAGS += -e FAUNA_ROOT_KEY=$(FAUNA_ROOT_KEY)
endif
ifdef FAUNA_ENDPOINT
DOCKER_RUN_FLAGS += -e FAUNA_ENDPOINT=$(FAUNA_ENDPOINT)
endif
ifdef FAUNA_TIMEOUT
DOCKER_RUN_FLAGS += -e FAUNA_TIMEOUT=$(FAUNA_TIMEOUT)
endif
ifdef FAUNA_QUERY_TIMEOUT_MS
DOCKER_RUN_FLAGS += -e FAUNA_QUERY_TIMEOUT_MS=$(FAUNA_QUERY_TIMEOUT_MS)
endif
test:
go test -v ./...
coverage:
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
jenkins-test:
go test -v -race -coverprofile=/fauna/faunadb-go/results/coverage.txt -covermode=atomic ./... 2>&1 | tee log.txt
go-junit-report -package-name faunadb -set-exit-code < log.txt > /fauna/faunadb-go/results/report.xml
docker-wait:
dockerize -wait $(FAUNA_ENDPOINT)/ping -timeout $(FAUNA_TIMEOUT)