-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
42 lines (29 loc) · 932 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
all: testall
LOCKFILE=/tmp/up.run
PULL=missing
testall:
for i in tests/*.py; do \
python $$i; \
done
test:
python $(FILE)
up: $(LOCKFILE)
down:
docker compose -p test down --rmi local --remove-orphans -v -t 1
make clean
$(LOCKFILE):
docker compose -p test -f compose.yml -f compose_test.yml up --pull $(PULL) --quiet-pull -d | tee $(LOCKFILE)
sleep 5
@echo "Waiting for db to be ready..."
sh -c "while ! docker exec --env-file=./env.txt $$(docker compose -p test ps -q db) /usr/local/bin/healthcheck.sh; do sleep 1; done"
@echo "コンテナの停止は必要に応じて実行してください(make down)"
clean:
rm -f $(LOCKFILE)
testall_in_docker: up
docker compose -p test exec -w /workspaces web make testall
@[ -n "$(DOWN)" ] && make down
test_in_docker: up
docker compose -p test exec -w /workspaces web make test FILE=$(FILE)
@[ -n "$(DOWN)" ] && make down
python-init:
pipenv install --dev