-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 838 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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!make
.PHONY: all
all: stop install build nyc start e2e stop
MODULE := ./node_modules/.bin
COMPOSE := docker-compose -f docker-compose.yml
.PHONY: install
install:
@echo "--- Installing dependencies."
npm install
.PHONY: build
build:
@echo "--- Build project."
docker build -t user-service .
.PHONY: test
test:
@echo "--- Running tests"
npm run test
.PHONY: nyc
nyc:
@echo "--- Running tests with nyc."
npm run nyc-report
.PHONY: start
start:
@echo "--- Building Docker and running app."
${COMPOSE} up -d
.PHONY: stop
stop:
@echo "--- Stop everything!"
${COMPOSE} down
.PHONY: clear
clear:
@echo "--- Clearing everything!"
rm -rf output
.PHONY: e2e
e2e:
@echo "--- Running integration tests"
sleep 20s # FIXME https://stackoverflow.com/questions/35069027/docker-wait-for-postgresql-to-be-running
npm run e2e