-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathjustfile
More file actions
239 lines (178 loc) · 7.38 KB
/
Copy pathjustfile
File metadata and controls
239 lines (178 loc) · 7.38 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
NEXTEST_PROFILE_ARGS := if env_var_or_default("CI", "") != "" { "-P ci" } else { "" }
TEST_FEATURE_ARGS := if env_var_or_default("CI", "") != "" { "--features only_ci" } else { "" }
SOURCE_TRACE_WASM_OUT := env_var_or_default("ACTON_SOURCE_TRACE_WASM_OUT", "/tmp/acton-source-trace-wasm")
FAUCET_POW_WASM_OUT := env_var_or_default("ACTON_FAUCET_POW_WASM_OUT", justfile_directory() + "/packages/explorer-ui/src/faucet/wasm")
LOCALTON_DEV_IMAGE := env_var_or_default("ACTON_STUDIO_LOCALTON_IMAGE", "localton:dev")
LOCALTON_BASE_IMAGE := env_var_or_default("LOCALTON_BASE_IMAGE", "ghcr.io/ton-blockchain/localton:sha-ede71005293920005bdc5639eac6c0d399d8c7a6")
all: precommit
build:
cargo build --release
build-dev:
cargo build
build-localton-dev-image:
docker build --target localton-rust-only --build-arg LOCALTON_BASE_IMAGE="{{ LOCALTON_BASE_IMAGE }}" --tag "{{ LOCALTON_DEV_IMAGE }}" apps/localton
build-source-trace-wasm:
wasm-pack build crates/acton-source-trace-wasm --target web --out-dir "{{ SOURCE_TRACE_WASM_OUT }}" --out-name acton_source_trace_wasm
build-faucet-pow-wasm:
wasm-pack build crates/acton-faucet-pow-wasm --release --target web --out-dir "{{ FAUCET_POW_WASM_OUT }}" --out-name acton_faucet_pow_wasm
rm -f "{{ FAUCET_POW_WASM_OUT }}/.gitignore"
sync-artifacts:
cargo xtask sync-artifacts
install-tools:
cargo install cargo-shear --version 1.13.1 --locked
cargo install cargo-deny --version 0.19.8 --locked
cargo install cargo-audit --version 0.22.1 --locked
cargo install typos-cli --version 1.47.2 --locked
cargo install cargo-llvm-cov --locked
rustup component add llvm-tools-preview
cargo install wasm-pack --version 0.15.0 --locked
test-unit:
cargo nextest run --workspace --lib --bins {{ NEXTEST_PROFILE_ARGS }} {{ TEST_FEATURE_ARGS }}
cargo test --workspace --doc --exclude tree-sitter-fift
test-integration:
cargo nextest run --test integration_test {{ NEXTEST_PROFILE_ARGS }} {{ TEST_FEATURE_ARGS }}
test-workspace:
cargo nextest run --workspace {{ NEXTEST_PROFILE_ARGS }} {{ TEST_FEATURE_ARGS }}
cargo test --workspace --doc --exclude tree-sitter-fift
install-test-ui-e2e-browsers:
bun run playwright install chromium
test-ui-e2e-run: install-test-ui-e2e-browsers
bunx tsc -p packages/test-ui/tsconfig.e2e.json --noEmit
bun run test:e2e:test-ui
test-explorer-ui-e2e-run: install-test-ui-e2e-browsers
bun run test:e2e:ui
test-explorer-ui-e2e-update: build-ui build-dev install-test-ui-e2e-browsers
CHECK_UI_SNAPSHOTS=1 bun run test:e2e:ui -- --update-snapshots
test-ui-e2e: build-ui build-dev test-ui-e2e-run
test-ui-e2e-update: build-ui build-dev install-test-ui-e2e-browsers
bunx tsc -p packages/test-ui/tsconfig.e2e.json --noEmit
CHECK_UI_SNAPSHOTS=1 bun run test:e2e:test-ui -- --update-snapshots
_tree-sitter-test grammar:
cd crates/tree-sitter-{{ grammar }}
npm ci
npm rebuild tree-sitter-cli --ignore-scripts=false
npx tree-sitter generate
npx tree-sitter test
test-tree-sitter-tolk:
just _tree-sitter-test tolk
test-tree-sitter-func:
just _tree-sitter-test func
test-tree-sitter-fift:
just _tree-sitter-test fift
test-tree-sitter-tasm:
just _tree-sitter-test tasm
test-tree-sitter-tlb:
just _tree-sitter-test tlb
test-tree-sitter-all: test-tree-sitter-fift test-tree-sitter-func test-tree-sitter-tasm test-tree-sitter-tlb test-tree-sitter-tolk
update-test-tree-sitter-tolk:
cd crates/tree-sitter-tolk
npm ci
npm rebuild tree-sitter-cli --ignore-scripts=false
npx tree-sitter generate
npx tree-sitter test -u
update-test-tree-sitter-func:
cd crates/tree-sitter-func
npm ci
npm rebuild tree-sitter-cli --ignore-scripts=false
npx tree-sitter generate
npx tree-sitter test -u
test: test-workspace
test-update:
SNAPSHOTS=overwrite just test
docgen:
cargo run -- docgen
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all --check
clippy:
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
check-deps:
cargo shear --deny-warnings
typos:
typos .
check-docgen:
cargo run -- docgen --check # always use latest acton
check-docs:
cd docs && bun ci && bun run generated-source && bun run fmt:check && bun run lint:links:internal && bun run lint:navigation && bun run build
check-schema:
cargo run -p xtask -- schema --schema acton-toml --check
cargo run -p xtask -- schema --schema lint-report --check
cargo run -p xtask -- schema --schema mutation-rules --check
cargo run -p xtask -- schema --schema language-server-settings --check
check-deny:
cargo deny check
check-audit:
cargo audit
check-templates-security:
cd src/commands/new/templates/counter-app && npm audit --audit-level=moderate
cd src/commands/new/templates/empty-app && npm audit --audit-level=moderate
cd src/commands/new/templates/jetton-app && npm audit --audit-level=moderate
cd src/commands/new/templates/nft-app && npm audit --audit-level=moderate
cd src/commands/new/templates/w5-extension-app && npm audit --audit-level=moderate
check-grammar-security:
cd crates/tree-sitter-fift && npm audit --audit-level=moderate
cd crates/tree-sitter-func && npm audit --audit-level=moderate
cd crates/tree-sitter-tasm && npm audit --audit-level=moderate
cd crates/tree-sitter-tlb && npm audit --audit-level=moderate
cd crates/tree-sitter-tolk && npm audit --audit-level=moderate
check-ui-security:
bun audit --audit-level=moderate
check-security: check-deny check-audit check-templates-security check-grammar-security check-ui-security
check-tolk:
cargo run -- test
cargo run -- fmt --check
cargo run -- check
check-ci: fmt-check check-docgen check-deps clippy typos check-schema check-tolk
check: check-ci check-security test
coverage-setup:
cargo install cargo-llvm-cov --locked
rustup component add llvm-tools-preview
coverage:
cargo llvm-cov --workspace --all-features --all-targets --lcov --output-path lcov.info -- --test-threads 1
coverage-html:
cargo llvm-cov --workspace --all-features --all-targets --html -- --test-threads 1
coverage-fmt-html:
cargo llvm-cov -p tolk-fmt --all-features --all-targets --html --open
coverage-clean:
cargo llvm-cov clean
build-ui:
bun ci
cd packages/test-ui && bun ci && bun run build
cd packages/explorer-core && bun ci && bun run build
cd packages/studio-ui && bun ci && bun run build
check-ui-ci:
bun run lint
bun run fmt:check
bun run doctor
check-ui: fmt-ui
bun run doctor
bun run lint:fix
fmt-ui:
bun run fmt
play-tree-sitter:
cd crates/tree-sitter-tolk
npm ci
npm rebuild tree-sitter-cli --ignore-scripts=false
npx tree-sitter generate
npx tree-sitter build --wasm
npx tree-sitter playground
play-tree-sitter-func:
cd crates/tree-sitter-func
npm ci
npm rebuild tree-sitter-cli --ignore-scripts=false
npx tree-sitter generate
npx tree-sitter build --wasm
npx tree-sitter playground
update-template-wrappers:
cargo xtask update-template-wrappers
precommit: fmt fmt-ui build build-ui check check-ui
clean:
cargo clean
rm -rf packages/test-ui/dist
rm -rf packages/studio-ui/dist
generate-schema:
cargo run -p xtask -- schema --schema acton-toml
cargo run -p xtask -- schema --schema lint-report
cargo run -p xtask -- schema --schema mutation-rules
cargo run -p xtask -- schema --schema language-server-settings