Skip to content

Commit fc111eb

Browse files
authored
chore(ci): test deprecations in CI (hyperium#3162)
1 parent 86bc750 commit fc111eb

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

.github/workflows/CI.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- msrv
1919
- miri
2020
- features
21+
- deprecated
2122
- ffi
2223
- ffi-header
2324
- doc
@@ -62,7 +63,7 @@ jobs:
6263

6364
include:
6465
- rust: stable
65-
features: "--features full,backports"
66+
features: "--features full,backports,deprecated"
6667
- rust: beta
6768
features: "--features full,backports"
6869
- rust: nightly
@@ -167,6 +168,34 @@ jobs:
167168
- name: check --feature-powerset
168169
run: cargo hack check --feature-powerset --depth 2 --skip ffi -Z avoid-dev-deps
169170

171+
deprecated:
172+
name: Check deprecated on ${{ matrix.rust }}
173+
needs: [style]
174+
strategy:
175+
matrix:
176+
rust:
177+
- stable
178+
- beta
179+
180+
runs-on: ubuntu-latest
181+
182+
steps:
183+
- name: Checkout
184+
uses: actions/checkout@v1
185+
186+
- name: Install Rust (${{ matrix.rust }})
187+
uses: actions-rs/toolchain@v1
188+
with:
189+
profile: minimal
190+
toolchain: ${{ matrix.rust }}
191+
override: true
192+
193+
- name: Check
194+
uses: actions-rs/cargo@v1
195+
with:
196+
command: check
197+
args: --features full,backports,deprecated
198+
170199
ffi:
171200
name: Test C API (FFI)
172201
needs: [style]

tests/client.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(warnings)]
22
#![warn(rust_2018_idioms)]
3+
#![cfg_attr(feature = "deprecated", allow(deprecated))]
34

45
#[macro_use]
56
extern crate matches;

tests/server.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![deny(warnings)]
22
#![deny(rust_2018_idioms)]
3+
#![cfg_attr(feature = "deprecated", allow(deprecated))]
34

45
use std::convert::TryInto;
56
use std::future::Future;
@@ -2643,6 +2644,7 @@ async fn http2_keep_alive_count_server_pings() {
26432644

26442645
// Tests for backported 1.0 APIs
26452646
#[deny(deprecated)]
2647+
#[cfg(feature = "backports")]
26462648
mod backports {
26472649
use super::*;
26482650
use hyper::server::conn::{http1, http2};

0 commit comments

Comments
 (0)