-
Notifications
You must be signed in to change notification settings - Fork 421
/
Copy pathtest-all.sh
executable file
·50 lines (40 loc) · 1.03 KB
/
test-all.sh
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
#!/bin/sh
# update ABIs
cd ./solidity
echo "+Updating core ABIs"
cd ./optics-core
npm run compile
echo "+Updating xapps ABIs"
cd ../optics-xapps
npm run compile
cd ..
# run Rust bins to output into vector JSON files
cd ../rust/optics-core
echo "+Running lib vector generation"
echo '+cargo run --bin lib_test_output --features output'
cargo run --bin lib_test_output --features output
echo "+Running utils vector generation"
echo '+cargo run --bin utils_test_output --features output'
cargo run --bin utils_test_output --features output
cd ..
# Run rust tests, clippy, and formatting
echo "+Running rust tests"
echo '+cargo fmt -- --check'
cargo fmt -- --check
echo '+cargo clippy -- -D warnings'
cargo clippy -- -D warnings
echo '+cargo test -- -q'
cargo test -- -q
cd ..
# Run solidity tests
cd ./solidity
# Run solidity/optics-core tests and lint
echo "+Running optics core tests"
cd ./optics-core
npm run lint
npm test
# Run solidity/optics-xapps tests and lint
echo "+Running optics-xapps tests"
cd ../optics-xapps
npm run lint
npm test