From 44cd36f430d695275b60560bb65b9fa2f5cd8515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Thu, 21 Nov 2024 12:36:20 +0100 Subject: [PATCH 1/5] Make the hive report run daily --- .../{weekly_hive.yaml => hive_coverage.yaml} | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) rename .github/workflows/{weekly_hive.yaml => hive_coverage.yaml} (81%) diff --git a/.github/workflows/weekly_hive.yaml b/.github/workflows/hive_coverage.yaml similarity index 81% rename from .github/workflows/weekly_hive.yaml rename to .github/workflows/hive_coverage.yaml index b02a833ae..c492d7afa 100644 --- a/.github/workflows/weekly_hive.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -1,9 +1,10 @@ -name: Weekly Hive Coverage +name: Daily Hive Coverage on: schedule: # Every Friday at midnight - - cron: '0 0 * * 5' + - cron: '0 0 * * *' + workflow_dispatch: env: RUST_VERSION: 1.80.1 @@ -41,3 +42,9 @@ jobs: - name: Run Hive Simulation run: make run-hive-on-latest SIMULATION=ethereum/engine + + - name: Caching + uses: Swatinem/rust-cache@v2 + + - name: Generate the hive report + run: cargo run -p hive_report From b5e0a4870bb162f589902a7f32189e7590cebb1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Thu, 21 Nov 2024 12:41:44 +0100 Subject: [PATCH 2/5] Continue even if hive simulation fails --- .github/workflows/hive_coverage.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index c492d7afa..355071667 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -42,6 +42,7 @@ jobs: - name: Run Hive Simulation run: make run-hive-on-latest SIMULATION=ethereum/engine + continue-on-error: true - name: Caching uses: Swatinem/rust-cache@v2 From 05b3d0eca1073b4e71ec3da923030c343e9c3631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Thu, 21 Nov 2024 12:43:03 +0100 Subject: [PATCH 3/5] fix comment --- .github/workflows/hive_coverage.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index 355071667..b11ec2ffb 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -2,7 +2,7 @@ name: Daily Hive Coverage on: schedule: - # Every Friday at midnight + # Every day at UTC midnight - cron: '0 0 * * *' workflow_dispatch: From 6b171beae024cec6011f644ace4db842981351d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Fri, 22 Nov 2024 18:09:19 +0100 Subject: [PATCH 4/5] Add results to github summary --- .github/workflows/hive_coverage.yaml | 2 +- cmd/hive_report/src/main.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/hive_coverage.yaml b/.github/workflows/hive_coverage.yaml index b11ec2ffb..ec0656565 100644 --- a/.github/workflows/hive_coverage.yaml +++ b/.github/workflows/hive_coverage.yaml @@ -48,4 +48,4 @@ jobs: uses: Swatinem/rust-cache@v2 - name: Generate the hive report - run: cargo run -p hive_report + run: cargo run -p hive_report >> $GITHUB_STEP_SUMMARY diff --git a/cmd/hive_report/src/main.rs b/cmd/hive_report/src/main.rs index b367aa597..11cdb8717 100644 --- a/cmd/hive_report/src/main.rs +++ b/cmd/hive_report/src/main.rs @@ -61,8 +61,10 @@ fn main() -> Result<(), Box> { // Sort by file name. results.sort_by(|a, b| a.0.cmp(&b.0)); + println!("# Hive coverage report"); + for (file_name, passed, total) in results { - println!("{}: {}/{}", file_name, passed, total); + println!("- {}: {}/{}", file_name, passed, total); } Ok(()) From 8a26ff415859cc55a331230f760c8cc13ea04fa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20Arjovsky?= Date: Fri, 22 Nov 2024 18:12:44 +0100 Subject: [PATCH 5/5] add newline --- cmd/hive_report/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/hive_report/src/main.rs b/cmd/hive_report/src/main.rs index 11cdb8717..5d7fea914 100644 --- a/cmd/hive_report/src/main.rs +++ b/cmd/hive_report/src/main.rs @@ -61,7 +61,7 @@ fn main() -> Result<(), Box> { // Sort by file name. results.sort_by(|a, b| a.0.cmp(&b.0)); - println!("# Hive coverage report"); + println!("# Hive coverage report\n"); for (file_name, passed, total) in results { println!("- {}: {}/{}", file_name, passed, total);