-
-
Notifications
You must be signed in to change notification settings - Fork 246
Expand file tree
/
Copy pathjustfile
More file actions
104 lines (68 loc) · 3.33 KB
/
Copy pathjustfile
File metadata and controls
104 lines (68 loc) · 3.33 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
set windows-shell := ["pwsh.exe", "-NoLogo", "-Command"]
init:
cargo install cargo-binstall
cargo binstall cargo-insta cargo-nextest cargo-llvm-cov
# BUILDING
build:
cargo build --workspace
build-wasm:
cd wasm && cargo build --workspace --target wasm32-wasip1 --release
# CHECKING
check:
cargo check --workspace
check-debug $CARGO_LOG="cargo::core::compiler::fingerprint=info" $RUST_LOG="info":
cargo check --workspace
check-wasm:
cd wasm && cargo check --workspace
format:
cargo fmt --all -- --emit=files
format-check:
cargo fmt --all --check
lint:
cargo clippy --workspace --all-targets -- -D warnings
lint-fix:
cargo clippy --workspace --all-targets --fix --allow-dirty --allow-staged
lint-wasm:
cd wasm && cargo clippy --workspace --all-targets
# TESTING
test $MOON_TEST="true" $STARBASE_TEST="true" filter="":
cargo nextest run --workspace --no-fail-fast --config-file ./.cargo/nextest.toml {{filter}}
test-package name $MOON_TEST="true" $STARBASE_TEST="true":
cargo nextest run --package {{name}} --no-fail-fast -j 4 --config-file ./.cargo/nextest.toml
test-ci $MOON_TEST="true" $STARBASE_TEST="true":
cargo nextest run --workspace --config-file ./.cargo/nextest.toml --profile ci
# CODE COVERAGE
cov:
cargo llvm-cov nextest --workspace --config-file ./.cargo/nextest.toml --profile ci
gen-report:
cargo llvm-cov report --lcov --ignore-filename-regex error --output-path ./report.txt
gen-html:
cargo llvm-cov report --html --ignore-filename-regex error --open
# RELEASING
release type="patch":
bash ./scripts/release/tag.sh {{type}}
release-crates type="patch":
cargo release {{type}} --execute -p moon_common -p moon_config -p moon_feature_flags -p moon_file_group -p moon_pdk -p moon_pdk_api -p moon_pdk_test_utils -p moon_project -p moon_target -p moon_task
bump:
yarn version check --interactive
# OTHER
docs:
cargo run -- run website:start
mcp:
npx @modelcontextprotocol/inspector -- cargo run -- mcp
moon-check:
cargo run -- check --all --log trace --summary
schemas:
cargo run -p moon_config_schema --features typescript
clean-bazel-remote:
rm -f ~/.moon/bazel-cache/cas.v2/.DS_Store && rm -f ~/.moon/bazel-cache/ac.v2/.DS_Store
bazel-remote:
just clean-bazel-remote && bazel-remote --dir ~/.moon/bazel-cache --max_size 10 --storage_mode uncompressed --grpc_address 0.0.0.0:9092
bazel-remote-tls:
just clean-bazel-remote && bazel-remote --dir ~/.moon/bazel-cache --max_size 10 --storage_mode uncompressed --grpc_address 0.0.0.0:9092 --tls_cert_file=./crates/remote/tests/__fixtures__/certs-local/server.crt --tls_key_file=./crates/remote/tests/__fixtures__/certs-local/server.key
bazel-remote-mtls:
just clean-bazel-remote && bazel-remote --dir ~/.moon/bazel-cache --max_size 10 --storage_mode uncompressed --tls_cert_file=./crates/remote/tests/__fixtures__/certs-local/server.crt --tls_key_file=./crates/remote/tests/__fixtures__/certs-local/server.key --tls_ca_file=./crates/remote/tests/__fixtures__/certs-local/ca.crt
otel-collector:
docker run --rm --name proto-otel -p 3000:3000 -p 4317:4317 -p 4318:4318 -v "$PWD/scripts/otel/otel-collector.yaml:/etc/otelcol/config.yaml" -v "$PWD/scripts/otel/data:/data" grafana/otel-lgtm:latest
otel-test *args:
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317 OTEL_EXPORTER_OTLP_PROTOCOL=grpc cargo run -p moon_cli -- --otel --otel-logs --otel-service-name moon-local --log trace {{args}}