diff --git a/.gitea/workflows/gitea-ci.yaml b/.gitea/workflows/gitea-ci.yaml index 064fc5b..cbe99e7 100644 --- a/.gitea/workflows/gitea-ci.yaml +++ b/.gitea/workflows/gitea-ci.yaml @@ -20,8 +20,12 @@ jobs: RUSTFLAGS: -C instrument-coverage steps: - uses: actions/checkout@v3 + - run: cargo build --no-default-features --all-targets + - run: cargo test --no-default-features --all-targets --no-fail-fast + - run: cargo build --all-targets + - run: cargo test --all-targets --no-fail-fast - run: cargo build --all-features --all-targets - - run: cargo test --all-features --all-targets --no-fail-fast + - run: cargo test --all-features --all-targets --no-fail-fast - run: >- grcov target/debug/profraw --binary-path target/debug/ @@ -44,5 +48,7 @@ jobs: container: docker.io/drrobot/musichoard-ci:rust-1.75 steps: - uses: actions/checkout@v3 + - run: cargo clippy --no-default-features --all-targets -- -D warnings + - run: cargo clippy --all-targets -- -D warnings - run: cargo clippy --all-features --all-targets -- -D warnings - run: cargo fmt -- --check diff --git a/Cargo.lock b/Cargo.lock index 491d365..8fdbfaf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -942,7 +942,6 @@ dependencies = [ "form_urlencoded", "idna", "percent-encoding", - "serde", ] [[package]] @@ -950,9 +949,6 @@ name = "uuid" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1674845326ee10d37ca60470760d4288a6f80f304007d92e5c53bab78c9cfd79" -dependencies = [ - "serde", -] [[package]] name = "vec_map" diff --git a/Cargo.toml b/Cargo.toml index cfbe4ba..eb83f81 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,8 +13,8 @@ serde = { version = "1.0.159", features = ["derive"], optional = true } serde_json = { version = "1.0.95", optional = true} structopt = { version = "0.3.26", optional = true} tokio = { version = "1.27.0", features = ["rt"], optional = true} -url = { version = "2.3.1", features = ["serde"] } -uuid = { version = "1.3.0", features = ["serde"] } +url = { version = "2.3.1" } +uuid = { version = "1.3.0" } [dev-dependencies] mockall = "0.11.4" diff --git a/tests/database/mod.rs b/tests/database/mod.rs index dfa5715..4e33b53 100644 --- a/tests/database/mod.rs +++ b/tests/database/mod.rs @@ -1,2 +1,3 @@ -#[cfg(feature = "database-json")] +#![cfg(feature = "database-json")] + pub mod json; diff --git a/tests/lib.rs b/tests/lib.rs index 867941d..4cf757c 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,21 +1,20 @@ +#![cfg(feature = "database-json")] +#![cfg(feature = "library-beets")] + mod database; mod library; mod testlib; -use musichoard::MusicHoard; - -#[cfg(feature = "database-json")] -use musichoard::database::json::{backend::JsonDatabaseFileBackend, JsonDatabase}; - -#[cfg(feature = "library-beets")] -use musichoard::library::beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary}; +use musichoard::{ + database::json::{backend::JsonDatabaseFileBackend, JsonDatabase}, + library::beets::{executor::BeetsLibraryProcessExecutor, BeetsLibrary}, + MusicHoard, +}; use crate::testlib::COLLECTION; #[test] -#[cfg(feature = "database-json")] -#[cfg(feature = "library-beets")] fn merge_library_then_database() { // Acquired the lock on the beets config file. We need to own the underlying object so later we // create a new one. This is okay as the purpose of the lock is to prevent other tests to access @@ -39,8 +38,6 @@ fn merge_library_then_database() { } #[test] -#[cfg(feature = "database-json")] -#[cfg(feature = "library-beets")] fn merge_database_then_library() { // Acquired the lock on the beets config file. We need to own the underlying object so later we // create a new one. This is okay as the purpose of the lock is to prevent other tests to access diff --git a/tests/library/mod.rs b/tests/library/mod.rs index 54227e8..232fed9 100644 --- a/tests/library/mod.rs +++ b/tests/library/mod.rs @@ -1,4 +1,5 @@ -#[cfg(feature = "library-beets")] +#![cfg(feature = "library-beets")] + pub mod beets; mod testmod;