From ccb17c04580b6090ee2ef536f9e1ec130fdfbf6e Mon Sep 17 00:00:00 2001 From: Urgau Date: Wed, 7 Feb 2024 19:01:33 +0100 Subject: [PATCH] Mark non-Rust code as such and enable CI doc-tests on ignored tests --- .github/workflows/ci.yml | 2 +- src/utils/mod.rs | 4 ++-- src/web/metrics.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 42efab561..069943763 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -107,7 +107,7 @@ jobs: env: DOCSRS_INCLUDE_DEFAULT_TARGETS: false run: | - cargo test --locked -- --test-threads=1 + cargo test --locked -- --ignored --test-threads=1 - name: Clean up the database run: docker-compose down --volumes diff --git a/src/utils/mod.rs b/src/utils/mod.rs index c62ab4423..e2e4131e8 100644 --- a/src/utils/mod.rs +++ b/src/utils/mod.rs @@ -94,7 +94,7 @@ where /// The join-error will also be converted into an `anyhow::Error`. /// /// with standard `tokio::task::spawn_blocking`: -/// ```ignore +/// ```text,ignore /// let data = spawn_blocking(move || -> anyhow::Result<_> { /// let data = get_the_data()?; /// Ok(data) @@ -104,7 +104,7 @@ where /// ``` /// /// with this helper function: -/// ```ignore +/// ```text,ignore /// let data = spawn_blocking(move || { /// let data = get_the_data()?; /// Ok(data) diff --git a/src/web/metrics.rs b/src/web/metrics.rs index 2b1bd3b76..f767e9fe6 100644 --- a/src/web/metrics.rs +++ b/src/web/metrics.rs @@ -72,7 +72,7 @@ pub(super) async fn instance_metrics_handler( /// since we need the route-name. /// /// Can be used like: -/// ```ignore +/// ```text,ignore /// get(handler).route_layer(middleware::from_fn(|request, next| async { /// request_recorder(request, next, Some("static resource")).await /// }))