Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,14 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: |
/home/runner/.cargo/bin/rustup install nightly-2021-11-29
/home/runner/.cargo/bin/rustup target add --toolchain=nightly-2021-11-29 wasm32-unknown-unknown
/home/runner/.cargo/bin/rustup show
/home/runner/.cargo/bin/rustup override unset
/home/runner/.cargo/bin/rustup show
- name: Use Node.js 14.x
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Cargo fmt
run: |
/home/runner/.cargo/bin/cargo +nightly-2021-11-29 fmt -- --check
/home/runner/.cargo/bin/cargo fmt -- --check
- name: Hadolint
env:
HADOLINT_VERSION: v2.8.0
Expand Down Expand Up @@ -101,7 +97,7 @@ jobs:
exit $total_exit_code
- name: Cargo clippy
run: |
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 clippy -- -D warnings
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo clippy --workspace -- -D warnings
- name: Cargo udeps
env:
UDEPS_VERSION: v0.1.24
Expand All @@ -110,8 +106,8 @@ jobs:
tar xzf "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz"
cp "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu/cargo-udeps" ~/.cargo/bin/
rm -r "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu.tar.gz" "cargo-udeps-${UDEPS_VERSION}-x86_64-unknown-linux-gnu"
/home/runner/.cargo/bin/cargo +nightly-2021-11-29 udeps --version
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 udeps --workspace --all-features
/home/runner/.cargo/bin/cargo udeps --version
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo udeps --workspace --all-features
continue-on-error: true # Often this turns gives false positives, due to the different ways that Substrate uses features.
test:
name: Unit Test
Expand All @@ -126,9 +122,7 @@ jobs:
run: curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin
- name: Run Test (with coverage)
run: |
/home/runner/.cargo/bin/rustup install nightly-2021-11-29
/home/runner/.cargo/bin/rustup component add llvm-tools-preview --toolchain=nightly-2021-11-29
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo +nightly-2021-11-29 llvm-cov --workspace --lcov --output-path lcov.info
SKIP_WASM_BUILD=1 /home/runner/.cargo/bin/cargo llvm-cov --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,4 @@ scripts/polkadot-launch/*.log

target
.env
**/.yarn/
3 changes: 1 addition & 2 deletions frame/composable-support/src/validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ impl<T: Validate<U> + Validate<V>, U, V> Validate<(U, V)> for T {

impl<T: codec::Decode + Validate<(U, V)>, U, V> codec::Decode for Validated<T, (U, V)> {
fn decode<I: codec::Input>(input: &mut I) -> Result<Self, codec::Error> {
let value = Validate::validate(T::decode(input)?)
.map_err(|desc| Into::<codec::Error>::into(desc))?;
let value = Validate::validate(T::decode(input)?).map_err(Into::<codec::Error>::into)?;
Ok(Validated { value, _marker: PhantomData })
}
fn skip<I: codec::Input>(input: &mut I) -> Result<(), codec::Error> {
Expand Down
1 change: 1 addition & 0 deletions integration-tests/simnode/src/events.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/// Concrete event type for verbose event asserts in tests.
#[allow(clippy::large_enum_variant)]
#[derive(derive_more::From)]
pub enum AllRuntimeEvents {
/// Picassoo runtime events
Expand Down
5 changes: 5 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[toolchain]
channel = "nightly-2021-11-29"
components = [ "rustfmt", "rustc", "rust-std", "cargo", "clippy", "llvm-tools-preview"]
targets = [ "wasm32-unknown-unknown" ]
profile = "minimal"