From 347a10eb05bfe9be1227d20e20330bd38b744ffc Mon Sep 17 00:00:00 2001 From: Sean McArthur Date: Fri, 30 Aug 2019 16:49:45 -0700 Subject: [PATCH] chore(ci): re-enable running of tests in CI --- .travis.yml | 11 ++++------- Cargo.toml | 47 +++++++++++++++++++++++++++++------------------ 2 files changed, 33 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index b5bbaf89..4972b8bd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,13 +6,12 @@ matrix: include: - rust: nightly env: FEATURES="--no-default-features --features runtime,nightly" - # Dependencies may be using the unstable `async_await` feature for now... #- rust: beta # env: FEATURES="--no-default-features --features runtime,__internal_happy_eyeballs_tests" #- rust: stable # env: FEATURES="--no-default-features --features runtime,__internal_happy_eyeballs_tests" - #- rust: stable - # env: FEATURES="--no-default-features" + - rust: nightly #stable + env: FEATURES="--no-default-features" # Minimum Supported Rust Version #- rust: 1.36.0 # env: FEATURES="--no-default-features --features runtime" BUILD_ONLY="1" @@ -25,10 +24,8 @@ matrix: # fi script: - - cargo build $FEATURES --all-targets - # Disable tests temporarily - # - 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES -- --test-threads=1; fi' - # - 'if [ $TRAVIS_RUST_VERSION = nightly ]; then for f in ./benches/*.rs; do cargo test --bench $(basename $f .rs) $FEATURES; done; fi' + - 'if [ "$BUILD_ONLY" != "1" ]; then cargo test $FEATURES -- --test-threads=1; fi' + - 'if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --benches $FEATURES; fi' env: global: diff --git a/Cargo.toml b/Cargo.toml index 1ef743c4..82ee388e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -54,8 +54,9 @@ spmc = "0.3" serde = "1.0" serde_derive = "1.0" serde_json = "1.0" -tokio-fs = "0.2.0-alpha.3" -tokio-test = "0.2.0-alpha.3" +tokio = "=0.2.0-alpha.4" # using #[tokio::test] attributes +tokio-fs = "=0.2.0-alpha.4" +tokio-test = "=0.2.0-alpha.4" url = "1.0" @@ -132,6 +133,16 @@ name = "state" path = "examples/state.rs" required-features = ["runtime"] +[[example]] +name = "tower_client" +path = "examples/tower_client.rs" +required-features = ["runtime"] + +[[example]] +name = "tower_server" +path = "examples/tower_server.rs" +required-features = ["runtime"] + [[example]] name = "upgrades" path = "examples/upgrades.rs" @@ -144,10 +155,10 @@ path = "examples/web_api.rs" required-features = ["runtime"] -#[[bench]] -#name = "end_to_end" -#path = "benches/end_to_end.rs" -#required-features = ["runtime"] +[[bench]] +name = "end_to_end" +path = "benches/end_to_end.rs" +required-features = ["runtime"] [[bench]] name = "pipeline" @@ -160,17 +171,17 @@ path = "benches/server.rs" required-features = ["runtime"] -#[[test]] -#name = "client" -#path = "tests/client.rs" -#required-features = ["runtime"] +[[test]] +name = "client" +path = "tests/client.rs" +required-features = ["runtime"] -#[[test]] -#name = "integration" -#path = "tests/integration.rs" -#required-features = ["runtime"] +[[test]] +name = "integration" +path = "tests/integration.rs" +required-features = ["runtime"] -#[[test]] -#name = "server" -#path = "tests/server.rs" -#required-features = ["runtime"] +[[test]] +name = "server" +path = "tests/server.rs" +required-features = ["runtime"]