diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 41733534..540478c1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,6 +13,7 @@ jobs: - rust: stable env: DO_COV: true + DO_LINT: true AS_DEPENDENCY: true DO_NO_STD: true - rust: beta @@ -106,19 +107,3 @@ jobs: RUSTFLAGS: "-C link-arg=-Tlink.x" CARGO_TARGET_THUMBV7M_NONE_EABI_RUNNER: "qemu-system-arm -cpu cortex-m3 -machine mps2-an385 -nographic -semihosting-config enable=on,target=native -kernel" run: cd embedded && cargo run --target thumbv7m-none-eabi - - Clippy: - name: Clippy - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - override: true - - run: rustup component add clippy - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-features -- -D warnings diff --git a/contrib/test.sh b/contrib/test.sh index 0bb0771b..04031f7a 100755 --- a/contrib/test.sh +++ b/contrib/test.sh @@ -31,6 +31,14 @@ if [ "$duplicate_dependencies" -ne 0 ]; then exit 1 fi +if [ "$DO_LINT" = true ] +then + cargo clippy --all-features --all-targets -- -D warnings + cargo clippy --example bip32 -- -D warnings + cargo clippy --example handshake -- -D warnings + cargo clippy --example ecdsa-psbt --features=bitcoinconsensus -- -D warnings +fi + echo "********* Testing std *************" # Test without any features other than std first cargo test --verbose --no-default-features --features="std"