diff --git a/tests/test_llm_openai.rs b/tests/test_llm_openai.rs index 1388f36..27640d9 100644 --- a/tests/test_llm_openai.rs +++ b/tests/test_llm_openai.rs @@ -4,6 +4,10 @@ use tempfile::tempdir; #[test] fn test_openai_request_by_no_config() { + if env::var("GITHUB_ACTIONS").is_ok() { + eprintln!("Skipping test in GitHub Actions environment"); + return; + } let temp_dir = tempdir().unwrap(); let prompt_dir = temp_dir.path().join("prompt.toml"); let file_path = temp_dir.path(); @@ -28,6 +32,10 @@ fn test_openai_request_by_no_config() { #[test] fn test_openai_request() { + if env::var("GITHUB_ACTIONS").is_ok() { + eprintln!("Skipping test in GitHub Actions environment"); + return; + } let home_dir = env::var("HOME").expect("Error getting home directory"); let config_dir = format!("{}/.config/commit_crafter", home_dir); let prompt_dir = format!("{}/.config/commit_crafter/prompt.toml", home_dir);