From cab1e3566b10402b26469f5afd77f8f98ad979ca Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 22 Oct 2021 13:30:46 -0700 Subject: [PATCH] Fix CI testing --- .github/workflows/main.yml | 4 +++- crates/cargo-test-support/Cargo.toml | 3 +++ crates/cargo-test-support/src/lib.rs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1443b7681b8..d4c84b7bf5f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -68,7 +68,9 @@ jobs: # Deny warnings on CI to avoid warnings getting into the codebase. - run: cargo test --features 'deny-warnings' - - run: cargo test --features 'deny-warnings' -p cargo-test-support + - run: cargo test --features 'deny-warnings' --manifest-path crates/cargo-test-support/Cargo.toml + env: + CARGO_TARGET_DIR: target - run: cargo test -p cargo-platform - run: cargo test -p cargo-util - run: cargo test --manifest-path crates/mdman/Cargo.toml diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml index f704dd5a3d5..7d57d9f02c7 100644 --- a/crates/cargo-test-support/Cargo.toml +++ b/crates/cargo-test-support/Cargo.toml @@ -23,3 +23,6 @@ tar = { version = "0.4.18", default-features = false } termcolor = "1.1.2" toml = "0.5.7" url = "2.2.2" + +[features] +deny-warnings = [] diff --git a/crates/cargo-test-support/src/lib.rs b/crates/cargo-test-support/src/lib.rs index 36fa9d2dabc..f8e34ed8957 100644 --- a/crates/cargo-test-support/src/lib.rs +++ b/crates/cargo-test-support/src/lib.rs @@ -5,6 +5,7 @@ #![allow(clippy::all)] #![warn(clippy::needless_borrow)] #![warn(clippy::redundant_clone)] +#![cfg_attr(feature = "deny-warnings", deny(warnings))] use std::env; use std::ffi::OsStr;