From a88e2827ac3b5545b98f403c61fc904f04f5ae9b Mon Sep 17 00:00:00 2001 From: Ivan Litteri <67517699+ilitteri@users.noreply.github.com> Date: Fri, 29 Nov 2024 11:33:23 -0300 Subject: [PATCH] fix(l1, l2, levm): slack message (#1355) --- .github/scripts/publish_levm_ef_tests_summary.sh | 2 +- .github/scripts/publish_loc.sh | 2 +- cmd/ef_tests/levm/report.rs | 2 +- cmd/loc/src/main.rs | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/scripts/publish_levm_ef_tests_summary.sh b/.github/scripts/publish_levm_ef_tests_summary.sh index 9b2e9d3c26..0d5591ff58 100644 --- a/.github/scripts/publish_levm_ef_tests_summary.sh +++ b/.github/scripts/publish_levm_ef_tests_summary.sh @@ -17,7 +17,7 @@ $(jq -n --arg text "$(cat cmd/ef_tests/levm/levm_ef_tests_summary_slack.txt)" '{ "type": "section", "text": { "type": "mrkdwn", - "text": "$text" + "text": $text } } ] diff --git a/.github/scripts/publish_loc.sh b/.github/scripts/publish_loc.sh index 0b8f293446..3e57cfd6c9 100644 --- a/.github/scripts/publish_loc.sh +++ b/.github/scripts/publish_loc.sh @@ -17,7 +17,7 @@ $(jq -n --arg text "$(cat loc_report_slack.txt)" '{ "type": "section", "text": { "type": "mrkdwn", - "text": "$text" + "text": $text } } ] diff --git a/cmd/ef_tests/levm/report.rs b/cmd/ef_tests/levm/report.rs index f205855826..d57401c770 100644 --- a/cmd/ef_tests/levm/report.rs +++ b/cmd/ef_tests/levm/report.rs @@ -112,7 +112,7 @@ pub fn summary_for_slack(reports: &[EFTestReport]) -> String { let total_run = reports.len(); let success_percentage = (total_passed as f64 / total_run as f64) * 100.0; format!( - r#"*Summary*: {total_passed}/{total_run} ({success_percentage:.2}%)\n\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n"#, + r#""*Summary*: {total_passed}/{total_run} ({success_percentage:.2}%)\n\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n{}\n""#, fork_summary_for_slack(reports, SpecId::CANCUN), fork_summary_for_slack(reports, SpecId::SHANGHAI), fork_summary_for_slack(reports, SpecId::HOMESTEAD), diff --git a/cmd/loc/src/main.rs b/cmd/loc/src/main.rs index 506ea752d6..78b33bee29 100644 --- a/cmd/loc/src/main.rs +++ b/cmd/loc/src/main.rs @@ -46,7 +46,7 @@ fn main() { let old_report: LinesOfCodeReport = std::fs::read_to_string("loc_report.json.old") .map(|s| serde_json::from_str(&s).unwrap()) - .unwrap_or_default(); + .unwrap_or(new_report); std::fs::write( "loc_report_slack.txt", @@ -67,7 +67,7 @@ fn slack_message(old_report: LinesOfCodeReport, new_report: LinesOfCodeReport) - let ethrex_diff_total = ethrex_l1_diff + ethrex_l2_diff + levm_diff; format!( - r#"*ethrex L1:* {} {}\n*ethrex L2:* {} {}\n*levm:* {} {}\n*ethrex (total):* {} {}"#, + r#""*ethrex L1:* {} {}\n*ethrex L2:* {} {}\n*levm:* {} {}\n*ethrex (total):* {} {}""#, new_report.ethrex_l1, if new_report.ethrex > old_report.ethrex { format!("(+{ethrex_l1_diff})")