-
Notifications
You must be signed in to change notification settings - Fork 57
/
Makefile
60 lines (46 loc) · 970 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
51
52
53
54
55
56
57
58
59
60
ISARDVDI_SRC := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
.PHONY: all
all: build up test
.PHONY: tidy
tidy:
go mod tidy
.PHONY: build
build: build-cfg build-compose
.PHONY: build-cfg
build-cfg:
bash build.sh
.PHONY: build-compose
build-compose:
docker compose build
.PHONY: pull
pull:
docker compose pull
.PHONY: up
up:
@echo Makeup 💄💅💁✨
docker compose up -d
.PHONY: down
down:
docker compose down --remove-orphans
.PHONY: reset
reset: down up
.PHONY: test
test: test-go test-e2e
.PHONY: test-go
test-go:
go test -race -cover ./...
.PHONY: test-e2e
test-e2e:
cd ${ISARDVDI_SRC}/frontend && yarn
docker run -it \
--rm --ipc=host \
--network=host \
-v "${ISARDVDI_SRC}/frontend:/frontend" \
-w "/frontend" \
mcr.microsoft.com/playwright:v1.38.0-jammy yarn playwright test
.PHONY: shell
shell:
docker exec -it ${CONTAINER} /bin/ash
.PHONY: shell-user
shell-user:
docker exec -u "$$(id -u):$$(id -g)" -it ${CONTAINER} /bin/ash