rewrite circleci config (#558)
* rewrite circleci config with better syntax and try using grcov for coverage * attempt to use less memory and to rerun if memory lack * actually remove use of kcov * use the right var * try looping * run test serialized * use feature where we should and make macro path independant * cargo fmt and remove some '"' * add zip to dependancies * reduce number of used thread after first failure * push translations to crowdin on commit to master * don't cache result of coverage
This commit is contained in:
@@ -8,6 +8,7 @@ use proc_macro::TokenStream;
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
use std::fs::{read_dir, File};
|
||||
use std::io::Read;
|
||||
use std::path::Path;
|
||||
use std::str::FromStr;
|
||||
|
||||
#[proc_macro]
|
||||
@@ -20,7 +21,12 @@ pub fn import_migrations(input: TokenStream) -> TokenStream {
|
||||
} else {
|
||||
"migrations"
|
||||
};
|
||||
let mut files = read_dir(migration_dir)
|
||||
let path = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.ancestors()
|
||||
.find(|path| path.join(migration_dir).is_dir() || path.join(".git").exists())
|
||||
.expect("migrations dir not found")
|
||||
.join(migration_dir);
|
||||
let mut files = read_dir(path)
|
||||
.unwrap()
|
||||
.map(|dir| dir.unwrap())
|
||||
.filter(|dir| dir.file_type().unwrap().is_dir())
|
||||
|
||||
Reference in New Issue
Block a user