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:
61
61
run : npm ci
62
62
63
63
- name : npm - lint
64
- run : npm run lint
64
+ run : make npm- lint
65
65
66
66
- name : npm - test
67
- run : npm test
67
+ run : make npm- test
68
68
69
69
- name : conditionally semantic release
70
70
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__/
6
6
node_modules /
7
7
/lib /
8
8
/* .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
4
24
5
25
py-test :
26
+ @echo " === Running target: py-test ==="
6
27
TARGET_BUCKET_URL=s3://dummy/web \
7
28
EXPIRE_SECONDS=86400 \
8
29
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
10
49
11
- py-format :
12
- black webapp_deploy
50
+ .PHONY : npm-lint
51
+ npm-lint :
52
+ @echo " === Running target: npm-lint ==="
53
+ npm run lint
13
54
55
+ .PHONY : py-lint
14
56
py-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.
8
8
What it does:
9
9
10
10
1 . 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
19
19
20
20
## Preserving old files
21
21
@@ -44,7 +44,7 @@ aws lambda invoke \
44
44
--payload ' {
45
45
"ResourceProperties": {
46
46
"artifactS3Url": "s3://my-bucket/my-release.tgz"
47
- },
47
+ },
48
48
"RequestType": "Update"
49
49
}' \
50
50
/tmp/out.log
Original file line number Diff line number Diff line change 1
- module . exports = {
1
+ export default {
2
2
extends : [ "@commitlint/config-conventional" ] ,
3
3
}
Original file line number Diff line number Diff line change 1
- module . exports = {
1
+ export default {
2
2
testMatch : [ "**/*.test.ts" ] ,
3
3
transform : {
4
4
"^.+\\.tsx?$" : "ts-jest" ,
You can’t perform that action at this time.
0 commit comments