From bc29e9c926ee6cd15310d2542b8e7afd0fcb4579 Mon Sep 17 00:00:00 2001 From: iximeow Date: Sat, 24 Jun 2023 12:58:27 -0700 Subject: crank dead code eliminator --- src/ci_runner.rs | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/src/ci_runner.rs b/src/ci_runner.rs index 023478e..b4acf16 100644 --- a/src/ci_runner.rs +++ b/src/ci_runner.rs @@ -136,36 +136,6 @@ impl RunningJob { Ok(()) } - async fn execute_goodfile(&self) -> Result { - Ok("string".to_string()) - } - - async fn default_goodfile(&self) -> Result { - let mut build = Command::new("cargo"); - build - .current_dir("tmpdir") - .arg("build"); - - let build_res = self.execute_command(build, "cargo build log", "cargo build").await?; - - if !build_res.success() { - return Err(format!("cargo build failed: {:?}", build_res)); - } - - let mut test = Command::new("cargo"); - test - .current_dir("tmpdir") - .arg("test"); - - let test_res = self.execute_command(test, "cargo test log", "cargo test").await?; - - match test_res.code() { - Some(0) => Ok("pass".to_string()), - Some(n) => Ok(format!("error: {}", n)), - None => Ok(format!("abnormal exit")), - } - } - async fn execute_command(&self, mut command: Command, name: &str, desc: &str) -> Result { eprintln!("[.] running {}", name); let mut stdout_artifact = self.create_artifact( -- cgit v1.1