mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-06 00:00:17 +02:00
ci: Switch cargo-public-api-crates to cargo-check-external-types (#3576)
This commit is contained in:
+10
-10
@@ -61,22 +61,22 @@ jobs:
|
|||||||
- name: cargo hack check
|
- name: cargo hack check
|
||||||
run: cargo hack check --each-feature --no-dev-deps --all
|
run: cargo hack check --each-feature --no-dev-deps --all
|
||||||
|
|
||||||
cargo-public-api-crates:
|
external-types:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
crate: [axum, axum-core, axum-extra, axum-macros]
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@nightly
|
- uses: dtolnay/rust-toolchain@master
|
||||||
|
with:
|
||||||
|
toolchain: nightly-2025-08-06
|
||||||
|
- name: Install cargo-check-external-types
|
||||||
|
uses: taiki-e/cache-cargo-install-action@v2
|
||||||
|
with:
|
||||||
|
tool: [email protected]
|
||||||
|
- uses: taiki-e/install-action@cargo-hack
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
save-if: ${{ github.ref == 'refs/heads/main' }}
|
save-if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
- name: Install cargo-public-api-crates
|
- run: cargo hack --no-private --exclude axum-macros check-external-types --all-features
|
||||||
run: |
|
|
||||||
cargo install --git https://github.com/jplatte/cargo-public-api-crates
|
|
||||||
- name: cargo public-api-crates check
|
|
||||||
run: cargo public-api-crates --manifest-path ${{ matrix.crate }}/Cargo.toml check
|
|
||||||
|
|
||||||
test-versions:
|
test-versions:
|
||||||
needs: check
|
needs: check
|
||||||
|
|||||||
@@ -11,15 +11,15 @@ readme = "README.md"
|
|||||||
repository = "https://github.com/tokio-rs/axum"
|
repository = "https://github.com/tokio-rs/axum"
|
||||||
version = "0.5.5" # remember to bump the version that axum and axum-extra depend on
|
version = "0.5.5" # remember to bump the version that axum and axum-extra depend on
|
||||||
|
|
||||||
[package.metadata.cargo-public-api-crates]
|
[package.metadata.cargo_check_external_types]
|
||||||
allowed = [
|
allowed_external_types = [
|
||||||
# not 1.0
|
# not 1.0
|
||||||
"futures_core",
|
"futures_core::*",
|
||||||
"tower_layer",
|
"tower_layer::*",
|
||||||
# >=1.0
|
# >=1.0
|
||||||
"bytes",
|
"bytes::*",
|
||||||
"http",
|
"http::*",
|
||||||
"http_body",
|
"http_body::*",
|
||||||
]
|
]
|
||||||
|
|
||||||
[package.metadata.cargo-machete]
|
[package.metadata.cargo-machete]
|
||||||
|
|||||||
+17
-19
@@ -14,26 +14,24 @@ version = "0.12.2"
|
|||||||
[package.metadata.docs.rs]
|
[package.metadata.docs.rs]
|
||||||
all-features = true
|
all-features = true
|
||||||
|
|
||||||
[package.metadata.cargo-public-api-crates]
|
[package.metadata.cargo_check_external_types]
|
||||||
allowed = [
|
allowed_external_types = [
|
||||||
"axum",
|
"axum::*",
|
||||||
"axum_core",
|
"axum_core::*",
|
||||||
"axum_macros",
|
"axum_macros::*",
|
||||||
"bytes",
|
"bytes::*",
|
||||||
"cookie",
|
"cookie::*",
|
||||||
"futures_core",
|
"futures_core::*",
|
||||||
"futures_util",
|
"futures_util::*",
|
||||||
"headers",
|
"headers",
|
||||||
"headers_core",
|
"headers_core::*",
|
||||||
"http",
|
"http::*",
|
||||||
"http_body",
|
"http_body::*",
|
||||||
"pin_project_lite",
|
"prost::*",
|
||||||
"prost",
|
"serde_core::*",
|
||||||
"serde_core",
|
"tokio::*",
|
||||||
"tokio",
|
"tower_layer::*",
|
||||||
"tokio_util",
|
"tower_service::*",
|
||||||
"tower_layer",
|
|
||||||
"tower_service",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
+14
-16
@@ -17,26 +17,24 @@ all-features = true
|
|||||||
[package.metadata.playground]
|
[package.metadata.playground]
|
||||||
features = ["http1", "http2", "json", "multipart", "ws"]
|
features = ["http1", "http2", "json", "multipart", "ws"]
|
||||||
|
|
||||||
[package.metadata.cargo-public-api-crates]
|
[package.metadata.cargo_check_external_types]
|
||||||
allowed = [
|
allowed_external_types = [
|
||||||
# our crates
|
# our crates
|
||||||
"axum_core",
|
"axum_core::*",
|
||||||
"axum_macros",
|
"axum_macros::*",
|
||||||
# not 1.0
|
# not 1.0
|
||||||
"futures_core",
|
"futures_core::*",
|
||||||
"futures_sink",
|
"futures_sink::*",
|
||||||
"futures_util",
|
"futures_util::*",
|
||||||
"pin_project_lite",
|
"tower_layer::*",
|
||||||
"tower_layer",
|
"tower_service::*",
|
||||||
"tower_service",
|
|
||||||
# >=1.0
|
# >=1.0
|
||||||
"bytes",
|
"bytes::*",
|
||||||
"http",
|
"http",
|
||||||
"http_body",
|
"http::*",
|
||||||
"serde_core",
|
"http_body::*",
|
||||||
"tokio",
|
"serde_core::*",
|
||||||
# for the `__private` feature
|
"tokio::*",
|
||||||
"reqwest",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -455,6 +455,7 @@ pub mod serve;
|
|||||||
|
|
||||||
#[cfg(any(test, feature = "__private"))]
|
#[cfg(any(test, feature = "__private"))]
|
||||||
#[allow(missing_docs, missing_debug_implementations, clippy::print_stdout)]
|
#[allow(missing_docs, missing_debug_implementations, clippy::print_stdout)]
|
||||||
|
#[doc(hidden)]
|
||||||
pub mod test_helpers;
|
pub mod test_helpers;
|
||||||
|
|
||||||
#[doc(no_inline)]
|
#[doc(no_inline)]
|
||||||
|
|||||||
Reference in New Issue
Block a user