Skip to content

Commit

Permalink
chore(ci): test deprecations in CI (#3162)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar authored Mar 9, 2023
1 parent 86bc750 commit fc111eb
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 1 deletion.
31 changes: 30 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- msrv
- miri
- features
- deprecated
- ffi
- ffi-header
- doc
Expand Down Expand Up @@ -62,7 +63,7 @@ jobs:

include:
- rust: stable
features: "--features full,backports"
features: "--features full,backports,deprecated"
- rust: beta
features: "--features full,backports"
- rust: nightly
Expand Down Expand Up @@ -167,6 +168,34 @@ jobs:
- name: check --feature-powerset
run: cargo hack check --feature-powerset --depth 2 --skip ffi -Z avoid-dev-deps

deprecated:
name: Check deprecated on ${{ matrix.rust }}
needs: [style]
strategy:
matrix:
rust:
- stable
- beta

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Install Rust (${{ matrix.rust }})
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true

- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --features full,backports,deprecated

ffi:
name: Test C API (FFI)
needs: [style]
Expand Down
1 change: 1 addition & 0 deletions tests/client.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![deny(warnings)]
#![warn(rust_2018_idioms)]
#![cfg_attr(feature = "deprecated", allow(deprecated))]

#[macro_use]
extern crate matches;
Expand Down
2 changes: 2 additions & 0 deletions tests/server.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#![deny(warnings)]
#![deny(rust_2018_idioms)]
#![cfg_attr(feature = "deprecated", allow(deprecated))]

use std::convert::TryInto;
use std::future::Future;
Expand Down Expand Up @@ -2643,6 +2644,7 @@ async fn http2_keep_alive_count_server_pings() {

// Tests for backported 1.0 APIs
#[deny(deprecated)]
#[cfg(feature = "backports")]
mod backports {
use super::*;
use hyper::server::conn::{http1, http2};
Expand Down

0 comments on commit fc111eb

Please sign in to comment.