-
Notifications
You must be signed in to change notification settings - Fork 55
Expand file tree
/
Copy pathTaskfile.yml
More file actions
124 lines (115 loc) · 3.63 KB
/
Copy pathTaskfile.yml
File metadata and controls
124 lines (115 loc) · 3.63 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
version: 3
includes:
tests:
taskfile: ./Taskfile.tests.yml
flatten: true
vars:
cross_env: npx cross-env
mocha_bin: npx mocha
c8_bin: npx c8
test_prefix: "{{ .cross_env }} MOCHA_SUITE_NAME"
reporter_prefix: "{{ .c8_bin }} --report-dir"
reporter_options_prefix: --reporter-options configFile=mocha-multi-reporter.json,cmrOutput=mocha-junit-reporter+mochaFile+junit
env:
SOLO_NETWORK_SIZE: 1
SOLO_NAMESPACE: solo-e2e
SOLO_DEPLOYMENT: solo-deployment
# SOLO_CHART_VERSION: 0.39.0
# CONSENSUS_NODE_VERSION: v0.58.0
HEDERA_SERVICES_ROOT: "/Users/user/source/hiero-consensus-node"
# LOCAL_BUILD_FLAG: "--local-build-path {{.HEDERA_SERVICES_ROOT}}/hedera-node/data"
# DEBUG_NODE_ALIAS: "node2"
# SOLO_CHARTS_DIR_FLAG: "--chart-dir /Users/user/source/solo-charts/charts"
# LOAD_BALANCER_FLAG: "--load-balancer"
ENABLE_EXPLORER_TLS_FLAG: "--enable-explorer-tls"
TLS_CLUSTER_ISSUER_TYPE_FLAG: "--tls-cluster-issuer-type acme-staging"
# NETWORK_DEPLOY_EXTRA_FLAGS: "--haproxy-ips node1="
ENABLE_EXPLORER_INGRESS: "--enable-ingress"
ENABLE_MIRROR_INGRESS: "--enable-ingress"
EXPLORER_NAME_SPACE: "explorer-name-space"
EXPLORER_DEPLOYMENT: ""
EXPLORER_CLUSTER_CONTEXT: "kind-solo-cluster"
tasks:
default:
desc: "List all available tasks"
cmds:
- task --list
npm:install:
desc: "Install npm dependencies"
sources:
- package.json
- package-lock.json
cmds:
- |
{{if .CI}}
npm ci
{{else}}
npm install
{{end}}
check:
desc: "Run all checks (lint, circular dependencies, typedoc)"
deps: [build]
sources:
- src/**/*.ts
- test/**/*.ts
- docs/site/cntent/**/*.md
cmds:
- npx remark . --quiet --frail
- echo OS:{{OS}}
- |
{{if eq OS "windows"}}
powershell "npx eslint . | Tee-Object -FilePath \"eslint.log\" -Append" && npx tsx lint-formatter.ts eslint.log
{{else}}
npx eslint . | tee eslint.log && npx tsx lint-formatter.ts eslint.log
{{end}}
- npx dpdm --no-warning --no-tree --exit-code circular:1 ./solo.ts
- npx typedoc --emit none
format:
desc: "Run all checks with auto-fix (lint, circular dependencies, typedoc)"
# Keep format independent from build:lint so eslint --fix can run before non-fix lint checks.
# We still compile first to catch TypeScript errors early.
deps: [build:compile]
sources:
- src/**/*.ts
- test/**/*.ts
- docs/site/cntent/**/*.md
cmds:
- npx remark . --quiet --frail --output
- npx eslint --fix {{.TASKFILE_DIR | toSlash}} || true
- npx dpdm --no-warning --no-tree ./solo.ts
- npx typedoc --emit none
- |
{{if eq OS "windows"}}
powershell "npx eslint . | Tee-Object -FilePath \"eslint.log\" -Append" && npx tsx lint-formatter.ts eslint.log
{{else}}
npx eslint . | tee eslint.log && npx tsx lint-formatter.ts eslint.log
{{end}}
build:
desc: "Build the project (compile and lint)"
deps: [npm:install]
sources:
- src/**/*.ts
- test/**/*.tss
cmds:
- task: "build:compile"
- task: "build:lint"
build:compile:
desc: "Compile the TypeScript code and run post-build script"
deps: [npm:install]
sources:
- src/**/*.ts
- test/**/*.tss
vars:
POST_BUILD_SCRIPT: "{{.TASKFILE_DIR | toSlash}}/resources/post-build-script.js"
cmds:
- rm -Rf dist
- npx tsc
- node {{.POST_BUILD_SCRIPT}}
build:lint:
desc: "Lint the TypeScript code"
deps: [npm:install]
sources:
- src/**/*.ts
- test/**/*.tss
cmds:
- npx eslint .