diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85c2704..a50c4f1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,8 +32,9 @@ jobs: profile: minimal toolchain: stable override: true - - run: cargo build --features bundled - - run: cargo test --features bundled + - run: cargo build --features bundled --workspace --all-targets + - run: cargo test --features bundled --workspace --all-targets + - run: cargo test --features bundled --workspace --doc - name: Static build if: matrix.platform.os == 'windows-latest' shell: cmd diff --git a/Cargo.toml b/Cargo.toml index 7661502..df9b2ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -73,6 +73,7 @@ memchr = "2.2.0" uuid = { version = "0.8", optional = true } [dev-dependencies] +doc-comment = "0.3" tempfile = "3.1.0" lazy_static = "1.0" regex = "1.0" diff --git a/README.md b/README.md index 2ae1a30..9cb89e0 100644 --- a/README.md +++ b/README.md @@ -122,7 +122,7 @@ You can adjust this behavior in a number of ways: link against that. This source is embedded in the `libsqlite3-sys` crate and is currently SQLite 3.30.1 (as of `rusqlite` 0.21.0 / `libsqlite3-sys` 0.17.0). This is probably the simplest solution to any build problems. You can enable this by adding the following in your `Cargo.toml` file: - ``` + ```toml [dependencies.rusqlite] version = "0.21.0" features = ["bundled"] diff --git a/src/lib.rs b/src/lib.rs index 3b05694..354a8ee 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -900,6 +900,9 @@ unsafe fn db_filename(_: *mut ffi::sqlite3) -> Option { None } +#[cfg(doctest)] +doc_comment::doctest!("../README.md"); + #[cfg(test)] mod test { use super::*;