[ci] Add all target to check

This commit is contained in:
Jean SIMARD 2020-11-30 17:41:01 +01:00
parent a77d517ac1
commit d1f34f926e
No known key found for this signature in database
GPG Key ID: 98BD56777D7767B4
6 changed files with 10 additions and 6 deletions

View File

@ -34,6 +34,7 @@ jobs:
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: clippy command: clippy
args: --all-targets -- --deny warnings
build-image: build-image:
name: Test the build of Docker image name: Test the build of Docker image

View File

@ -326,8 +326,11 @@ fn search_command(command: SearchCommand, database: Database) -> Result<(), Box<
let schema = schema.ok_or(meilisearch_core::Error::SchemaMissing)?; let schema = schema.ok_or(meilisearch_core::Error::SchemaMissing)?;
let fields = command.displayed_fields.iter().map(String::as_str); let fields = command
let fields = HashSet::from_iter(fields); .displayed_fields
.iter()
.map(String::as_str)
.collect::<HashSet<_>>();
let config = Config::builder().auto_add_history(true).build(); let config = Config::builder().auto_add_history(true).build();
let mut readline = Editor::<()>::with_config(config); let mut readline = Editor::<()>::with_config(config);

View File

@ -176,7 +176,7 @@ where I: IntoIterator<Item=Operation>,
const MAX_NGRAM: usize = 3; const MAX_NGRAM: usize = 3;
fn split_query_string<'a, A: AsRef<[u8]>>(s: &str, stop_words: &'a fst::Set<A>) -> Vec<(usize, String)> { fn split_query_string<A: AsRef<[u8]>>(s: &str, stop_words: &fst::Set<A>) -> Vec<(usize, String)> {
// TODO: Use global instance instead // TODO: Use global instance instead
Analyzer::new(AnalyzerConfig::default_with_stopwords(stop_words)) Analyzer::new(AnalyzerConfig::default_with_stopwords(stop_words))
.analyze(s) .analyze(s)

View File

@ -101,7 +101,7 @@ where
} else { } else {
let error = ResponseError::from(Error::InvalidToken(auth_header.to_string())).error_response(); let error = ResponseError::from(Error::InvalidToken(auth_header.to_string())).error_response();
let (request, _) = req.into_parts(); let (request, _) = req.into_parts();
return Box::pin(ok(ServiceResponse::new(request, error))) Box::pin(ok(ServiceResponse::new(request, error)))
} }
} }
} }

View File

@ -175,7 +175,7 @@ async fn update_multiple_documents(
.ok_or(meilisearch_core::Error::SchemaMissing)?; .ok_or(meilisearch_core::Error::SchemaMissing)?;
match (params.into_inner().primary_key, schema.primary_key()) { match (params.into_inner().primary_key, schema.primary_key()) {
(Some(_), Some(_)) => return Err(meilisearch_schema::Error::PrimaryKeyAlreadyPresent)?, (Some(_), Some(_)) => return Err(meilisearch_schema::Error::PrimaryKeyAlreadyPresent.into()),
(Some(key), None) => document_addition.set_primary_key(key), (Some(key), None) => document_addition.set_primary_key(key),
(None, None) => { (None, None) => {
let key = body let key = body

View File

@ -16,7 +16,7 @@ async fn trigger_and_wait_dump(server: &mut common::Server) -> String {
let dump_uid = value["uid"].as_str().unwrap().to_string(); let dump_uid = value["uid"].as_str().unwrap().to_string();
for _ in 0..20 as u8 { for _ in 0..20_u8 {
let (value, status_code) = server.get_dump_status(&dump_uid).await; let (value, status_code) = server.get_dump_status(&dump_uid).await;
assert_eq!(status_code, 200); assert_eq!(status_code, 200);