forked from Fund-My-Cause/Fund-My-Cause
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.29 KB
/
Copy pathcontract.yml
File metadata and controls
44 lines (34 loc) · 1.29 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
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: 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 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