fix(arr): make CI compile the translation backends
Every translation backend sits behind a default-off cargo feature, and the gate ran with the default set, so clippy and the test run never saw a line of arr-subs' openai, deepl or google modules. #191 and #192 each reported it after verifying their own work by hand. lint and test now pass --all-features. Also drops a duplicated wiremock suppression the #188 merge left behind and puts the module list back in order.
This commit is contained in:
@@ -15,17 +15,21 @@ fmt-check:
|
||||
fmt:
|
||||
cargo fmt --all
|
||||
|
||||
# Clippy, warnings denied.
|
||||
# Clippy, warnings denied. `--all-features` matters: every subtitle
|
||||
# translation backend sits behind a default-off cargo feature, so without it
|
||||
# the gate never compiles a line of them (#191, #192).
|
||||
lint:
|
||||
cargo clippy --all-targets -- -D warnings
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
|
||||
# Unused workspace dependencies. Stable toolchain, unlike cargo-udeps.
|
||||
deps:
|
||||
cargo machete
|
||||
|
||||
# Unit and integration tests, excluding the e2e crate.
|
||||
# Unit and integration tests, excluding the e2e crate. `--all-features` for
|
||||
# the same reason `lint` needs it: the translation backends are feature-gated
|
||||
# and would otherwise never run.
|
||||
test:
|
||||
cargo nextest run --workspace --exclude arr-e2e
|
||||
cargo nextest run --workspace --exclude arr-e2e --all-features
|
||||
|
||||
# End-to-end tests. Needs a Transmission container (`just e2e-up`); not part
|
||||
# of the push gate. Never point this at the production Transmission LXC.
|
||||
|
||||
@@ -26,15 +26,9 @@ pub mod convert;
|
||||
pub mod decode;
|
||||
#[cfg(feature = "translate-deepl")]
|
||||
pub mod deepl;
|
||||
pub mod error;
|
||||
#[cfg(feature = "translate-google")]
|
||||
pub mod google;
|
||||
// `unused_crate_dependencies` is a per-target lint; `wiremock` is only used
|
||||
// from the `tests/podnapisi.rs` integration target, not from this library
|
||||
// target's own `#[cfg(test)]` module.
|
||||
#[cfg(test)]
|
||||
use wiremock as _;
|
||||
|
||||
pub mod error;
|
||||
pub mod model;
|
||||
#[cfg(feature = "translate-openai")]
|
||||
pub mod openai;
|
||||
@@ -60,9 +54,9 @@ pub use srt::Cue;
|
||||
pub use sync::{Outcome, Rejection, Syncer, DEFAULT_BINARY as ALASS_DEFAULT_BINARY};
|
||||
pub use translate::{Backend, BackendId, Batch, BatchCue, TranslateFuture, TranslatedCue};
|
||||
|
||||
// The OpenSubtitles provider's HTTP paths are exercised by the integration
|
||||
// tests, which link this crate; the unit-test target still has to satisfy
|
||||
// the unused-crate-dependencies lint for the dev-dependency itself.
|
||||
// `unused_crate_dependencies` is a per-target lint. Every provider and
|
||||
// backend exercises its HTTP paths from an integration target under `tests/`,
|
||||
// so this library target never uses `wiremock` itself and has to say so.
|
||||
#[cfg(test)]
|
||||
use wiremock as _;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user