forked from fauna/faunadb-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (26 loc) · 877 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
32
33
34
35
RUNTIME_IMAGE ?= ruby:2.2-alpine
DOCKER_RUN_FLAGS = -it --rm
ifdef FAUNA_ROOT_KEY
DOCKER_RUN_FLAGS += -e FAUNA_ROOT_KEY=$(FAUNA_ROOT_KEY)
endif
ifdef FAUNA_DOMAIN
DOCKER_RUN_FLAGS += -e FAUNA_DOMAIN=$(FAUNA_DOMAIN)
endif
ifdef FAUNA_SCHEME
DOCKER_RUN_FLAGS += -e FAUNA_SCHEME=$(FAUNA_SCHEME)
endif
ifdef FAUNA_PORT
DOCKER_RUN_FLAGS += -e FAUNA_PORT=$(FAUNA_PORT)
endif
ifdef FAUNA_TIMEOUT
DOCKER_RUN_FLAGS += -e FAUNA_TIMEOUT=$(FAUNA_TIMEOUT)
endif
test:
bundle exec rake spec
jenkins-test:
bundle exec rspec --format progress --format RspecJunitFormatter --out results/report.xml
docker-wait:
dockerize -wait $(FAUNA_SCHEME)://$(FAUNA_DOMAIN):$(FAUNA_PORT)/ping -timeout $(FAUNA_TIMEOUT)
docker-test:
docker build -f Dockerfile.test -t faunadb-ruby-test:latest --build-arg RUNTIME_IMAGE=$(RUNTIME_IMAGE) .
docker run $(DOCKER_RUN_FLAGS) faunadb-ruby-test:latest