-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
68 lines (54 loc) · 1.3 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
57
58
59
60
61
62
63
64
65
66
67
68
VENV = .venv/bin
.PHONY: all
all: install-deps build fmt lint test
.PHONY: install-deps
install-deps:
@echo "=== Running target: install-deps ==="
npm install --ignore-scripts
python3 -m venv .venv && \
$(VENV)/pip install -r requirements.txt
.PHONY: build
build:
@echo "=== Running target: build ==="
npm run build # runs build through prepare-script
.PHONY: test
test: npm-test py-test
npm-test:
@echo "=== Running target: npm-test ==="
npm run test
py-test:
@echo "=== Running target: py-test ==="
TARGET_BUCKET_URL=s3://dummy/web \
EXPIRE_SECONDS=86400 \
DEPLOY_LOG_BUCKET_URL=s3://dummy/deployments.log \
$(VENV)/python -m unittest discover webapp_deploy
.PHONY: fmt
fmt:
npm run lint:fix
$(VENV)/black webapp_deploy
.PHONY: npm-fmt
npm-fmt:
@echo "=== Running target: npm-fmt ==="
npm run format
.PHONY: py-fmt
py-fmt:
@echo "=== Running target: py-fmt ==="
$(VENV)/black webapp_deploy
.PHONY: lint
lint: npm-lint py-lint
.PHONY: npm-lint
npm-lint:
@echo "=== Running target: npm-lint ==="
npm run lint
.PHONY: py-lint
py-lint:
@echo "=== Running target: py-lint ==="
$(VENV)/flake8 --exclude .venv webapp_deploy
$(VENV)/black --check webapp_deploy
.PHONY: snapshots
snapshots:
@echo "=== Running target: snapshots ==="
npm test -- --updateSnapshot
.PHONY: clean
clean:
rm -rf dist/ lib/