forked from garudaidr/icp-subaccount-indexer
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (29 loc) · 1.02 KB
/
build-and-test.yml
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
name: Build and Test ICP Prototype Backend
on: [push, pull_request]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.75.0
components: rustfmt, clippy
override: true
- name: Install rustup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
rustup install 1.27.1
rustup default 1.27.1
- name: Install wasm32 target
run: rustup target add wasm32-unknown-unknown
- name: Run cargo fmt
run: cargo fmt -- --check
- name: Run cargo clippy
run: cargo clippy -- -D warnings
- name: Build with cargo
run: cargo build --release --target wasm32-unknown-unknown --package icp_prototype_backend
- name: Run tests with cargo
run: cargo test --features "happy_path" && cargo test --features "sad_path"