File tree Expand file tree Collapse file tree 12 files changed +622
-39
lines changed
Expand file tree Collapse file tree 12 files changed +622
-39
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 @@ -6,3 +6,4 @@ __pycache__/
66node_modules /
77/lib /
88/* .tgz
9+ .idea
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
Original file line number Diff line number Diff line change @@ -8,14 +8,14 @@ threshold.
88What it does:
99
10101 . Fetch deployment log from S3
11- 1 . Fetch bundled artifact and extract locally with optional filtering
12- 1 . Upload all non-html files to S3
13- 1 . Upload html files to S3
14- 1 . Add uploaded items to deployment log
15- 1 . Delete old items from S3
16- 1 . Prune old deployments from deployment log
17- 1 . Store deployment log to S3 for next run
18- 1 . Optionally invalidate CloudFront distribution
11+ 2 . Fetch bundled artifact and extract locally with optional filtering
12+ 3 . Upload all non-html files to S3
13+ 4 . Upload html files to S3
14+ 5 . Add uploaded items to deployment log
15+ 6 . Delete old items from S3
16+ 7 . Prune old deployments from deployment log
17+ 8 . Store deployment log to S3 for next run
18+ 9 . Optionally invalidate CloudFront distribution
1919
2020## Preserving old files
2121
@@ -44,7 +44,7 @@ aws lambda invoke \
4444 --payload ' {
4545 "ResourceProperties": {
4646 "artifactS3Url": "s3://my-bucket/my-release.tgz"
47- },
47+ },
4848 "RequestType": "Update"
4949 }' \
5050 /tmp/out.log
Original file line number Diff line number Diff line change 1- module . exports = {
1+ export default {
22 extends : [ "@commitlint/config-conventional" ] ,
33}
Original file line number Diff line number Diff line change 1- module . exports = {
1+ export default {
22 testMatch : [ "**/*.test.ts" ] ,
33 transform : {
44 "^.+\\.tsx?$" : "ts-jest" ,
You can’t perform that action at this time.
0 commit comments