diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 609438d..da1ff9d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,7 +3,7 @@ name: Test on: workflow_dispatch: -jobs: +jo: test: runs-on: 'ubuntu-latest' steps: diff --git a/Cargo.lock b/Cargo.lock index b0f92b1..ca12aa3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2324,7 +2324,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "wrkflw" -version = "0.2.1" +version = "0.3.0" dependencies = [ "async-trait", "bollard", diff --git a/Cargo.toml b/Cargo.toml index 772be68..2815cd2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wrkflw" -version = "0.2.1" +version = "0.3.0" edition = "2021" description = "A GitHub Actions workflow validator and executor" documentation = "https://github.com/bahdotsh/wrkflw" diff --git a/src/ui.rs b/src/ui.rs index 5f39d2a..dc8c1e4 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -540,10 +540,10 @@ impl App { }, output: step_result.output.clone(), }) - .collect(), + .collect::>(), logs: vec![job_result.logs.clone()], }) - .collect(); + .collect::>(); } Err(e) => { let timestamp = Local::now().format("%H:%M:%S").to_string(); @@ -551,6 +551,18 @@ impl App { .logs .push(format!("[{}] Error: {}", timestamp, e)); execution_details.progress = 1.0; + + // Create a dummy job with the error information so users can see details + execution_details.jobs = vec![JobExecution { + name: "Workflow Execution".to_string(), + status: JobStatus::Failure, + steps: vec![StepExecution { + name: "Execution Error".to_string(), + status: StepStatus::Failure, + output: format!("Error: {}\n\nThis error prevented the workflow from executing properly.", e), + }], + logs: vec![format!("Workflow execution error: {}", e)], + }]; } } }