-
Notifications
You must be signed in to change notification settings - Fork 37
Expand file tree
/
Copy pathjustfile
More file actions
85 lines (63 loc) · 2.93 KB
/
Copy pathjustfile
File metadata and controls
85 lines (63 loc) · 2.93 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
set dotenv-load := true
export PATH := './target/debug:./target/bin:' + env_var('PATH')
export CONFIG_DIR := 'target/'
export CI_BUILD := env_var_or_default('CI_BUILD', '')
[private]
path:
just --list
scaffold +args:
@cargo run --bin stellar-scaffold --quiet -- {{ args }}
reporter +args:
@cargo run --bin stellar-scaffold-reporter --quiet -- {{ args }}
stellar-scaffold +args:
@cargo run $CI_BUILD --bin stellar-scaffold -- {{ args }}
s +args:
@stellar {{ args }}
stellar +args:
@stellar {{ args }}
build_contract p:
stellar contract build --profile contracts --package {{ p }}
# Build the CLI and the fixture test contracts
build:
cargo build $CI_BUILD --package stellar-scaffold-cli
just build-cli-test-contracts
# Setup the project to use a pinned version of the CLI
setup:
git config core.hooksPath .githooks
-cargo binstall -y stellar-cli --version 27.0.0 --force --install-path ./target/bin
# Build stellar-scaffold-cli test contracts to speed up testing
build-cli-test-contracts:
just stellar-scaffold build --manifest-path crates/stellar-scaffold-test/fixtures/soroban-init-boilerplate/Cargo.toml
test: build
cargo t
test-integration: build-cli-test-contracts
cargo t --features integration-tests
[private]
_test-integration package filter ci="false":
cargo t -E 'package({{ package }}) and {{ filter }}' \
{{ if ci == "false" { '--features integration-tests' } else { '--binaries-metadata target/nextest/binaries-metadata.json --cargo-metadata target/nextest/cargo-metadata.json --target-dir-remap target --workspace-remap .' } }}
[private]
_test-scaffold filter ci="false":
just _test-integration stellar-scaffold-cli '{{ filter }}' {{ ci }}
# Run scaffold-cli accounts & contracts integration tests
test-integration-scaffold-build-clients ci="false":
just _test-scaffold 'test(build_clients)' {{ ci }}
# Run scaffold-cli init_script, network, watch & clean integration tests
test-integration-scaffold-features ci="false":
just _test-scaffold 'test(features::)' {{ ci }}
# Run scaffold-cli example integration tests (cases 1-14)
test-integration-scaffold-examples-1 ci="false":
just _test-scaffold 'test(examples::) and test(/case_01/)' {{ ci }}
just _test-scaffold 'test(examples::) and (test(/case_0[2-9]/) or test(/case_1[0-4]/))' {{ ci }}
# Run scaffold-cli example integration tests (cases 15-27)
test-integration-scaffold-examples-2 ci="false":
just _test-scaffold 'test(examples::) and test(/case_15/)' {{ ci }}
just _test-scaffold 'test(examples::) and (test(/case_1[6-9]/) or test(/case_2/))' {{ ci }}
# Run reporter integration tests
test-integration-reporter ci="false":
just _test-integration stellar-scaffold-reporter 'test(/./)' {{ ci }}
clippy *args:
cargo clippy --all {{ args }} \
-- -Dclippy::pedantic -Aclippy::must_use_candidate -Aclippy::missing_errors_doc -Aclippy::missing_panics_doc
clippy-test:
just clippy --tests --all-features