Skip to content

Commit d8782e2

Browse files
authored
Merge pull request #18 from osmosis-labs/JakeHartnell/add-basic-ci
Add basic CI
2 parents ada7fd9 + 9dfa9f7 commit d8782e2

File tree

4 files changed

+80
-2
lines changed

4 files changed

+80
-2
lines changed

.cargo/config

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[alias]
2+
wasm = "build --release --lib --target wasm32-unknown-unknown"
3+
wasm-debug = "build --lib --target wasm32-unknown-unknown"

.github/workflows/basic.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml
2+
3+
on: [push, pull_request]
4+
5+
name: Basic Checks
6+
7+
jobs:
8+
test:
9+
name: Test Suite
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@v2
14+
15+
- name: Install toolchain
16+
uses: actions-rs/toolchain@v1
17+
with:
18+
profile: minimal
19+
toolchain: 1.65.0
20+
target: wasm32-unknown-unknown
21+
override: true
22+
23+
- name: Run build
24+
uses: actions-rs/cargo@v1
25+
with:
26+
toolchain: 1.65.0
27+
command: build
28+
args: --workspace
29+
env:
30+
RUST_BACKTRACE: 1
31+
32+
- name: Run tests
33+
uses: actions-rs/cargo@v1
34+
with:
35+
toolchain: 1.65.0
36+
command: test
37+
args: --workspace
38+
env:
39+
RUST_BACKTRACE: 1
40+
41+
- name: Compile WASM contract
42+
uses: actions-rs/cargo@v1
43+
with:
44+
toolchain: 1.65.0
45+
command: wasm
46+
env:
47+
RUSTFLAGS: "-C link-arg=-s"
48+
49+
lints:
50+
name: Lints
51+
runs-on: ubuntu-latest
52+
steps:
53+
- name: Checkout sources
54+
uses: actions/checkout@v2
55+
56+
- name: Install toolchain
57+
uses: actions-rs/toolchain@v1
58+
with:
59+
profile: minimal
60+
toolchain: 1.65.0
61+
override: true
62+
components: rustfmt, clippy
63+
64+
- name: Run cargo fmt
65+
uses: actions-rs/cargo@v1
66+
with:
67+
toolchain: 1.65.0
68+
command: fmt
69+
args: --all -- --check
70+
71+
- name: Run cargo clippy
72+
uses: actions-rs/cargo@v1
73+
with:
74+
toolchain: 1.65.0
75+
command: clippy
76+
args: --all-targets -- -D warnings

contracts/native-staking/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ library = []
1818

1919
[dependencies]
2020
mesh-apis = { workspace = true }
21-
mesh-native-staking-proxy = { workspace = true }
21+
mesh-native-staking-proxy = { workspace = true, features = ["library"] }
2222

2323
sylvia = { workspace = true }
2424
cosmwasm-schema = { workspace = true }

packages/apis/src/local_staking_api.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pub struct MaxSlashResponse {
88
pub max_slash: Decimal,
99
}
1010

11-
1211
/// This is the interface to any local staking contract needed by the vault contract.
1312
/// Users will need to use the custom methods to actually manage funds
1413
#[interface]

0 commit comments

Comments
 (0)