forked from Fund-My-Cause/Fund-My-Cause
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (48 loc) · 2.27 KB
/
Copy pathcontract.yml
File metadata and controls
65 lines (48 loc) · 2.27 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
name: Contract CI
on:
push:
branches: [main, develop]
paths:
- 'contracts/**'
- '.github/workflows/contract.yml'
pull_request:
branches: [main, develop]
paths:
- 'contracts/**'
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- uses: Swatinem/rust-cache@v2
with:
workspaces: contracts
- name: Build contracts
run: cargo build --release --target wasm32-unknown-unknown --manifest-path contracts/crowdfund/Cargo.toml
- name: Build registry contract
run: cargo build --release --target wasm32-unknown-unknown --manifest-path contracts/registry/Cargo.toml
- name: Build achievements contract
run: cargo build --release --target wasm32-unknown-unknown --manifest-path contracts/achievements/Cargo.toml
- name: Run contract tests
run: cargo test --workspace --manifest-path contracts/crowdfund/Cargo.toml
- name: Run registry tests
run: cargo test --workspace --manifest-path contracts/registry/Cargo.toml
- name: Run achievements tests
run: cargo test --workspace --manifest-path contracts/achievements/Cargo.toml
- name: Run fuzz tests (property-based)
run: cargo test --test fuzz_tests --manifest-path contracts/crowdfund/Cargo.toml -- --nocapture
- name: Run invariant tests
run: cargo test --test invariants --manifest-path contracts/crowdfund/Cargo.toml -- --nocapture
- name: Run adversarial tests
run: cargo test --test adversarial --manifest-path contracts/crowdfund/Cargo.toml -- --nocapture
- name: Run clippy
run: cargo clippy --workspace --all-targets --manifest-path contracts/crowdfund/Cargo.toml -- -D warnings
- name: Check formatting
run: cargo fmt --all --check --manifest-path contracts/crowdfund/Cargo.toml
- name: Run achievements clippy
run: cargo clippy --workspace --all-targets --manifest-path contracts/achievements/Cargo.toml -- -D warnings
- name: Check achievements formatting
run: cargo fmt --all --check --manifest-path contracts/achievements/Cargo.toml