Skip to content

Commit b695867

Browse files
committed
test: Check feature powerset on CI
1 parent 2605d43 commit b695867

File tree

6 files changed

+33
-12
lines changed

6 files changed

+33
-12
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches:
66
- main
7-
- feat/*
7+
- feat/*
88
pull_request:
99

1010
env:
@@ -63,7 +63,7 @@ jobs:
6363
- name: Test project no default features
6464
run: cargo test --locked --no-default-features
6565
- name: Clippy project
66-
run: cargo clippy --all-targets -- -D warnings
66+
run: cargo clippy --all-targets -- -D warnings
6767
- name: Fmt check project
6868
run: cargo fmt --check
6969

@@ -75,7 +75,7 @@ jobs:
7575
run: cargo test --locked --no-default-features
7676
- name: Clippy examples
7777
working-directory: examples
78-
run: cargo clippy --all-targets -- -D warnings
78+
run: cargo clippy --all-targets -- -D warnings
7979
- name: Fmt check examples
8080
working-directory: examples
8181
run: cargo fmt --check
@@ -146,11 +146,11 @@ jobs:
146146
name: Code coverage
147147
runs-on: ubuntu-latest
148148
container:
149-
image: xd009642/tarpaulin:0.31.1
150-
options: --security-opt seccomp=unconfined
149+
image: xd009642/tarpaulin:0.31.1
150+
options: --security-opt seccomp=unconfined
151151
steps:
152-
- name: Checkout sources
153-
uses: actions/checkout@v4
152+
- name: Checkout sources
153+
uses: actions/checkout@v4
154154
- name: Cache
155155
uses: actions/cache@v4
156156
with:
@@ -161,12 +161,25 @@ jobs:
161161
~/.cargo/git/db/
162162
target/
163163
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
164-
- name: Generate code coverage
164+
- name: Generate code coverage
165165
run: |
166166
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out xml --engine llvm
167-
- name: Upload to codecov.io
168-
uses: codecov/codecov-action@v5
167+
- name: Upload to codecov.io
168+
uses: codecov/codecov-action@v5
169169
with:
170-
fail_ci_if_error: true
170+
fail_ci_if_error: true
171171
env:
172172
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
173+
174+
cheack-features:
175+
name: Check all variations of feature sets
176+
runs-on: ubuntu-latest
177+
steps:
178+
- name: Checkout repository
179+
uses: actions/checkout@v4
180+
with:
181+
fetch-depth: 0
182+
- name: Install Rust toolchain
183+
uses: dtolnay/rust-toolchain@stable
184+
- name: Test with cargo-hack
185+
run: cargo install cargo-hack && cargo hack test --feature-powerset

sylvia/tests/multitest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(feature = "mt")]
1+
#![cfg(all(feature = "mt", feature = "cosmwasm_1_2"))]
22

33
use cw_multi_test::IntoBech32;
44
use std::marker::PhantomData;

sylvia/tests/remote.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "mt")]
2+
13
use cosmwasm_schema::cw_serde;
24
use serde::de::DeserializeOwned;
35
use serde::{Deserialize, Serialize};

sylvia/tests/reply_data.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "mt")]
2+
13
use cosmwasm_schema::cw_serde;
24
use cosmwasm_std::to_json_binary;
35
use cw_storage_plus::Item;

sylvia/tests/reply_dispatch.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "mt")]
2+
13
use cosmwasm_schema::cw_serde;
24
use cosmwasm_std::{BankMsg, CosmosMsg, Empty, SubMsgResult};
35
use cw_storage_plus::Item;

sylvia/tests/reply_generation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg(feature = "mt")]
2+
13
use cosmwasm_std::{Binary, SubMsgResult};
24
use itertools::Itertools;
35
use sylvia::ctx::InstantiateCtx;

0 commit comments

Comments
 (0)