Skip to content

Commit

Permalink
fix(l1, l2, levm): slack message (#1355)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilitteri authored Nov 29, 2024
1 parent 4bc120d commit a88e282
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/publish_levm_ef_tests_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/publish_loc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $(jq -n --arg text "$(cat loc_report_slack.txt)" '{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "$text"
"text": $text
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion cmd/ef_tests/levm/report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions cmd/loc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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})")
Expand Down

0 comments on commit a88e282

Please sign in to comment.