@@ -20,73 +20,65 @@ jobs:
2020 - beta
2121 - nightly
2222 steps :
23- - uses : actions/checkout@v4
24-
25- - name : Install Rust
26- uses : actions-rs/toolchain@v1
27- with :
28- profile : minimal
29- toolchain : ${{ matrix.rust }}
30- override : true
31- components : rustfmt, clippy
32-
33- - name : Cache cargo registry
34- uses : actions/cache@v3
35- with :
36- path : |
37- ~/.cargo/registry
38- ~/.cargo/git
39- target
40- key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41-
42- - name : Add WASM target
43- run : rustup target add wasm32-unknown-unknown
44-
45- - name : Install cargo-contract
46- run : cargo install cargo-contract --locked
47-
48- - name : Check formatting
49- run : cargo fmt --all -- --check
50-
51- - name : Run clippy
52- run : cargo clippy --all-targets --all-features -- -D warnings
53-
54- - name : Run unit tests
55- run : cargo test --all-features
56-
57- - name : Run e2e tests
58- run : cargo test -p propchain-tests --features e2e-tests
59-
60- - name : Run coverage analysis
61- run : cargo tarpaulin --all-features --workspace --out Xml --exclude-files contracts/lib/src/tests.rs tests/property_registry_tests.rs
62-
63- - name : Upload coverage reports
64- uses : codecov/codecov-action@v3
65- with :
66- file : ./cobertura.xml
67- fail_ci_if_error : false
68-
69- - name : Build contracts
70- run : |
71- cd contracts
72- for dir in */; do
73- if [ -f "$dir/Cargo.toml" ]; then
74- cd "$dir"
75- cargo contract build
76- cd ..
77- fi
78- done
79-
80- - name : Run contract tests
81- run : |
82- cd contracts
83- for dir in */; do
84- if [ -f "$dir/Cargo.toml" ]; then
85- cd "$dir"
86- cargo contract test
87- cd ..
88- fi
89- done
23+ - uses : actions/checkout@v4
24+
25+ - name : Install Rust
26+ uses : actions-rs/toolchain@v1
27+ with :
28+ profile : minimal
29+ toolchain : ${{ matrix.rust }}
30+ override : true
31+ components : rustfmt, clippy
32+
33+ - name : Cache cargo registry
34+ uses : actions/cache@v3
35+ with :
36+ path : |
37+ ~/.cargo/registry
38+ ~/.cargo/git
39+ target
40+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
41+
42+ - name : Add WASM target
43+ run : rustup target add wasm32-unknown-unknown
44+
45+ - name : Install cargo-contract
46+ run : cargo install cargo-contract --locked
47+
48+ - name : Check formatting
49+ run : cargo fmt --all -- --check
50+
51+ - name : Run clippy
52+ run : cargo clippy --all-targets --all-features -- -D warnings
53+
54+ - name : Run tests
55+ run : cargo test --all-features
56+
57+ - name : Run PropertyRegistry unit tests
58+ working-directory : contracts/lib
59+ run : cargo test --lib
60+
61+ - name : Build contracts
62+ run : |
63+ cd contracts
64+ for dir in */; do
65+ if [ -f "$dir/Cargo.toml" ]; then
66+ cd "$dir"
67+ cargo contract build
68+ cd ..
69+ fi
70+ done
71+
72+ - name : Run contract tests
73+ run : |
74+ cd contracts
75+ for dir in */; do
76+ if [ -f "$dir/Cargo.toml" ]; then
77+ cd "$dir"
78+ cargo contract test
79+ cd ..
80+ fi
81+ done
9082
9183 security :
9284 name : Security Audit
0 commit comments