diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e1c1e1608..3c211dcc1 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -8,22 +8,36 @@ on: jobs: check: - # Run `cargo check` first to ensure that the pushed code at least compiles. runs-on: ubuntu-latest strategy: matrix: - rust: [stable, 1.40.0] + rust: [stable, 1.46.0] steps: - uses: actions/checkout@master - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} profile: minimal + override: true - name: Check uses: actions-rs/cargo@v1 with: command: check - args: --all --all-targets --all-features + args: --workspace --all-features --all-targets + + check-docs: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - name: cargo doc + working-directory: ${{ matrix.subcrate }} + env: + RUSTDOCFLAGS: "-D rustdoc::broken_intra_doc_links" + run: cargo doc --all-features --no-deps cargo-hack: runs-on: ubuntu-latest @@ -38,7 +52,7 @@ jobs: curl -LsSf https://github.com/taiki-e/cargo-hack/releases/latest/download/cargo-hack-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin - name: cargo hack check working-directory: ${{ matrix.subcrate }} - run: cargo hack check --each-feature --no-dev-deps --all + run: cargo hack check --each-feature --no-dev-deps --workspace test-versions: # Test against the stable, beta, and nightly Rust toolchains on ubuntu-latest. @@ -46,21 +60,21 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - rust: [stable, beta, nightly, 1.40.0] + rust: [stable, beta, nightly, 1.46.0] steps: - uses: actions/checkout@master - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} profile: minimal + override: true - name: Run tests uses: actions-rs/cargo@v1 with: command: test - args: --all --all-features + args: --workspace --all-features style: - # Check style. needs: check runs-on: ubuntu-latest steps: @@ -75,22 +89,6 @@ jobs: with: command: fmt args: --all -- --check - - # warnings: - # # Check for any warnings. This is informational and thus is allowed to fail. - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@master - # - uses: actions-rs/toolchain@v1 - # with: - # toolchain: stable - # components: clippy - # profile: minimal - # - name: Clippy - # uses: actions-rs/clippy-check@v1 - # with: - # token: ${{ secrets.GITHUB_TOKEN }} - # args: --all --all-targets --all-features -- -D warnings deny-check: name: cargo-deny check diff --git a/README.md b/README.md index cdc91c3d2..401d0de15 100644 --- a/README.md +++ b/README.md @@ -29,9 +29,9 @@ Tower aims to make it as easy as possible to build robust networking clients and servers. It is protocol agnostic, but is designed around a request / response pattern. If your protocol is entirely stream based, Tower may not be a good fit. -## Status +## Minimum supported Rust version -Currently, `tower 0.4` is released on crates.io. +tower's MSRV is 1.46. ## Getting Started diff --git a/deny.toml b/deny.toml index 6ec664ee9..1b996ad41 100644 --- a/deny.toml +++ b/deny.toml @@ -2,7 +2,7 @@ vulnerability = "deny" unmaintained = "warn" notice = "warn" -ignore = [] +ignore = ["RUSTSEC-2020-0159"] [licenses] unlicensed = "deny" diff --git a/tower-layer/src/lib.rs b/tower-layer/src/lib.rs index b664011d7..379955de5 100644 --- a/tower-layer/src/lib.rs +++ b/tower-layer/src/lib.rs @@ -5,7 +5,7 @@ rust_2018_idioms, unreachable_pub )] -#![deny(rustdoc::broken_intra_doc_links)] +// `rustdoc::broken_intra_doc_links` is checked on CI //! Layer traits and extensions. //! diff --git a/tower-service/Cargo.toml b/tower-service/Cargo.toml index 2e79971eb..8670a6922 100644 --- a/tower-service/Cargo.toml +++ b/tower-service/Cargo.toml @@ -26,5 +26,5 @@ edition = "2018" [dev-dependencies] http = "0.2" tower-layer = { version = "0.3", path = "../tower-layer" } -tokio = { version = "1" } +tokio = { version = "1", features = ["macros", "time"] } futures = "0.3" diff --git a/tower-service/src/lib.rs b/tower-service/src/lib.rs index 7bc9028e2..34e02a45e 100644 --- a/tower-service/src/lib.rs +++ b/tower-service/src/lib.rs @@ -5,7 +5,7 @@ rust_2018_idioms, unreachable_pub )] -#![deny(rustdoc::broken_intra_doc_links)] +// `rustdoc::broken_intra_doc_links` is checked on CI //! Definition of the core `Service` trait to Tower //! diff --git a/tower-test/src/lib.rs b/tower-test/src/lib.rs index 1f5869869..5fe841a6b 100644 --- a/tower-test/src/lib.rs +++ b/tower-test/src/lib.rs @@ -6,7 +6,7 @@ unreachable_pub )] #![allow(elided_lifetimes_in_paths)] -#![deny(rustdoc::broken_intra_doc_links)] +// `rustdoc::broken_intra_doc_links` is checked on CI //! Mock `Service` that can be used in tests. diff --git a/tower/Cargo.toml b/tower/Cargo.toml index b9e9da818..1ef95d83d 100644 --- a/tower/Cargo.toml +++ b/tower/Cargo.toml @@ -88,8 +88,6 @@ tokio-test = "0.4" tower-test = { version = "0.4", path = "../tower-test" } tracing-subscriber = "0.2.14" http = "0.2" -# env_logger = { version = "0.5.3", default-features = false } -# log = "0.4.1" [package.metadata.docs.rs] all-features = true diff --git a/tower/src/lib.rs b/tower/src/lib.rs index 61ce3ac9b..68bb84186 100644 --- a/tower/src/lib.rs +++ b/tower/src/lib.rs @@ -5,10 +5,10 @@ rust_2018_idioms, unreachable_pub )] -#![deny(rustdoc::broken_intra_doc_links)] #![allow(elided_lifetimes_in_paths, clippy::type_complexity)] #![cfg_attr(test, allow(clippy::float_cmp))] #![cfg_attr(docsrs, feature(doc_cfg))] +// `rustdoc::broken_intra_doc_links` is checked on CI //! `async fn(Request) -> Result` //!