-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (42 loc) · 2.11 KB
/
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
51
52
53
54
55
56
web-client := web-client
thermometer-sensor := thermometer-sensor
data-ingestion := data-ingestion
integration-tests := integration-tests
# ---
$(web-client)/node_modules: $(web-client)/package.json
docker-compose run --rm web-client sh -c 'yarn install && touch node_modules'
$(thermometer-sensor)/node_modules: $(thermometer-sensor)/package.json
docker-compose run --rm thermometer-sensor sh -c 'yarn install && touch node_modules'
$(data-ingestion)/node_modules: $(data-ingestion)/package.json
docker-compose run --rm data-ingestion sh -c 'yarn install && touch node_modules'
$(integration-tests)/node_modules: $(integration-tests)/package.json
docker-compose run --rm integration-tests sh -c 'yarn install && touch node_modules'
# ---
.PHONY: dev
dev: $(web-client)/node_modules $(thermometer-sensor)/node_modules $(data-ingestion)/node_modules
docker-compose up --build
.PHONY: lint
lint: $(web-client)/node_modules $(thermometer-sensor)/node_modules
docker-compose run --rm $(web-client) yarn lint
docker-compose run --rm $(thermometer-sensor) yarn lint
.PHONY: format
format: $(web-client)/node_modules $(thermometer-sensor)/node_modules $(integration-tests)/node_modules
docker-compose run --rm $(web-client) yarn format
docker-compose run --rm $(thermometer-sensor) yarn format
docker-compose run --rm $(integration-tests) yarn format
.PHONY: test
test: $(web-client)/node_modules $(thermometer-sensor)/node_modules lint
docker-compose run --rm $(web-client) yarn test
docker-compose run --rm $(thermometer-sensor) yarn test
.PHONY: test.integration
test.integration: lint $(integration-tests)/node_modules
docker-compose run --rm $(integration-tests) yarn test
.PHONY: test.web-client.watch
test.web-client.watch: $(web-client)/node_modules
docker-compose run --rm $(web-client) yarn test:watch
.PHONY: test.thermometer-sensor.watch
test.thermometer-sensor.watch: $(thermometer-sensor)/node_modules
docker-compose run --rm $(thermometer-sensor) yarn test:watch
.PHONY: test.integration.watch
test.integration.watch: lint $(integration-tests)/node_modules
docker-compose run --rm $(integration-tests) yarn test:watch