chore: test use dotenvy

This commit is contained in:
Zack Fu Zi Xiang 2024-07-26 21:27:19 +08:00
parent 5efdd6e8b9
commit d890c8b93e
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ use flowy_user_pub::cloud::UserCloudService;
use flowy_user_pub::entities::Authenticator;
pub fn get_supabase_config() -> Option<SupabaseConfiguration> {
dotenv::from_path(".env.ci").ok()?;
dotenvy::from_path(".env.ci").ok()?;
SupabaseConfiguration::from_env().ok()
}
@ -80,13 +80,13 @@ pub async fn receive_with_timeout<T>(mut receiver: Receiver<T>, duration: Durati
}
pub fn get_supabase_ci_config() -> Option<SupabaseConfiguration> {
dotenv::from_filename("./.env.ci").ok()?;
dotenvy::from_filename("./.env.ci").ok()?;
SupabaseConfiguration::from_env().ok()
}
#[allow(dead_code)]
pub fn get_supabase_dev_config() -> Option<SupabaseConfiguration> {
dotenv::from_filename("./.env.dev").ok()?;
dotenvy::from_filename("./.env.dev").ok()?;
SupabaseConfiguration::from_env().ok()
}

View File

@ -22,7 +22,7 @@ use crate::setup_log;
/// - `GOTRUE_ADMIN_EMAIL=admin@example.com`
/// - `GOTRUE_ADMIN_PASSWORD=password`
pub fn get_af_cloud_config() -> Option<AFCloudConfiguration> {
dotenv::from_filename("./.env.ci").ok()?;
dotenvy::from_filename("./.env.ci").ok()?;
setup_log();
AFCloudConfiguration::from_env().ok()
}

View File

@ -23,14 +23,14 @@ use lib_infra::future::FutureResult;
use crate::setup_log;
pub fn get_supabase_ci_config() -> Option<SupabaseConfiguration> {
dotenv::from_filename("./.env.ci").ok()?;
dotenvy::from_filename("./.env.ci").ok()?;
setup_log();
SupabaseConfiguration::from_env().ok()
}
#[allow(dead_code)]
pub fn get_supabase_dev_config() -> Option<SupabaseConfiguration> {
dotenv::from_filename("./.env.dev").ok()?;
dotenvy::from_filename("./.env.dev").ok()?;
setup_log();
SupabaseConfiguration::from_env().ok()
}