-
Notifications
You must be signed in to change notification settings - Fork 9
52 lines (42 loc) · 1.09 KB
/
basic-rust.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
40
41
42
43
44
45
46
47
48
49
50
51
52
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
name: Test and Lint CW contracts
on:
pull_request:
branches:
- "**"
paths:
- "contracts/cosmwasm-vm/**"
- "libraries/common/rust/**"
- ".github/workflows/basic-rust.yml"
push:
branches:
- main
jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Run unit tests
run: |
RUST_BACKTRACE=1 cargo unit-test --locked
- name: Compile WASM contract
run: |
RUSTFLAGS='-C link-arg=-s' cargo wasm --locked
lints:
name: Lints
runs-on: ubuntu-latest
defaults:
run:
working-directory: contracts/cosmwasm-vm
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Cache Rust dependencies
uses: Swatinem/rust-cache@v2
- name: Run cargo clippy
run: |
cargo clippy