From 115c1b48309b4bbefb2c3d7b8cdea2ca5a6633a0 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Tue, 5 May 2020 21:52:30 -0700 Subject: [PATCH] Exclude expansion tests from test suite by default This test isn't high enough signal to have all contributors run it. --- .github/workflows/ci.yml | 12 ------------ test_suite/Cargo.toml | 1 + test_suite/build.rs | 2 +- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 626ea4b2..9f8bbbdf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,18 +60,6 @@ jobs: - run: cd test_suite/no_std && cargo build if: matrix.os != 'windows' - macro: - name: Macro test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: dtolnay/rust-toolchain@nightly - - name: Download cargo-expand - run: | - curl -sSo ~/.cargo/bin/cargo-expand https://github.com/dtolnay/cargo-expand/releases/download/0.6.0/cargo-expand - chmod +x ~/.cargo/bin/cargo-expand - - run: cd test_suite && cargo test --test expandtest - msrv: name: Rust 1.13.0 runs-on: ubuntu-latest diff --git a/test_suite/Cargo.toml b/test_suite/Cargo.toml index b528b031..b0ddbb8a 100644 --- a/test_suite/Cargo.toml +++ b/test_suite/Cargo.toml @@ -7,6 +7,7 @@ publish = false build = "build.rs" [features] +expandtest = [] unstable = ["serde/unstable"] [dependencies] diff --git a/test_suite/build.rs b/test_suite/build.rs index 5271f2d6..4ead539f 100644 --- a/test_suite/build.rs +++ b/test_suite/build.rs @@ -23,7 +23,7 @@ fn has_rustfmt() -> bool { } fn main() { - if has_cargo_expand() && has_rustfmt() { + if cfg!(feature = "expandtest") && has_cargo_expand() && has_rustfmt() { println!("cargo:rustc-cfg=expandtest"); } }