File tree Expand file tree Collapse file tree 2 files changed +53
-10
lines changed
Expand file tree Collapse file tree 2 files changed +53
-10
lines changed Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ jobs:
6161 run : npm ci
6262
6363 - name : npm - lint
64- run : npm run lint
64+ run : make npm- lint
6565
6666 - name : npm - test
67- run : npm test
67+ run : make npm- test
6868
6969 - name : conditionally semantic release
7070 if : ${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
Original file line number Diff line number Diff line change 1- all :
2- @echo " Specify a valid target"
3- @exit 1
1+ VENV = .venv/bin
2+
3+ .PHONY : all
4+ all : install-deps build fmt lint test
5+
6+ .PHONY : install-deps
7+ install-deps :
8+ @echo " === Running target: install-deps ==="
9+ npm install --ignore-scripts
10+ python3 -m venv .venv && \
11+ $(VENV ) /pip install -r requirements.txt
12+
13+ .PHONY : build
14+ build :
15+ @echo " === Running target: build ==="
16+ npm run build # runs build through prepare-script
17+
18+ .PHONY : test
19+ test : npm-test py-test
20+
21+ npm-test :
22+ @echo " === Running target: npm-test ==="
23+ npm run test
424
525py-test :
26+ @echo " === Running target: py-test ==="
627 TARGET_BUCKET_URL=s3://dummy/web \
728 EXPIRE_SECONDS=86400 \
829 DEPLOY_LOG_BUCKET_URL=s3://dummy/deployments.log \
9- python -m unittest discover webapp_deploy
30+ $(VENV ) /python -m unittest discover webapp_deploy
31+
32+ .PHONY : fmt
33+ fmt :
34+ npm run lint:fix
35+ $(VENV ) /black webapp_deploy
36+
37+ .PHONY : npm-fmt
38+ npm-fmt :
39+ @echo " === Running target: npm-fmt ==="
40+ npm run format
41+
42+ .PHONY : py-fmt
43+ py-fmt :
44+ @echo " === Running target: py-fmt ==="
45+ $(VENV ) /black webapp_deploy
46+
47+ .PHONY : lint
48+ lint : npm-lint py-lint
1049
11- py-format :
12- black webapp_deploy
50+ .PHONY : npm-lint
51+ npm-lint :
52+ @echo " === Running target: npm-lint ==="
53+ npm run lint
1354
55+ .PHONY : py-lint
1456py-lint :
15- flake8 --exclude .venv webapp_deploy
16- black --check webapp_deploy
57+ @echo " === Running target: py-lint ==="
58+ $(VENV ) /flake8 --exclude .venv webapp_deploy
59+ $(VENV ) /black --check webapp_deploy
You can’t perform that action at this time.
0 commit comments