mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-26 12:05:05 +08:00
[ci] Add all target to check
This commit is contained in:
parent
a77d517ac1
commit
d1f34f926e
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@ -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
|
||||||
|
@ -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);
|
||||||
|
@ -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)
|
||||||
|
@ -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)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user