Skip to content

Commit

Permalink
feat(l1): post hive report to slack as well as summary (#1257)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkenan authored Nov 25, 2024
1 parent 7f4e76f commit 1007322
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/hive_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,28 @@ jobs:
uses: Swatinem/rust-cache@v2

- name: Generate the hive report
run: cargo run -p hive_report >> $GITHUB_STEP_SUMMARY
id: report
run: |
cargo run -p hive_report > results.md
echo "content=$(cat results.md)" >> $GITHUB_OUTPUT
- name: Post results in summary
run: |
echo "# Hive coverage report\n\n" >> $GITHUB_STEP_SUMMARY
$(cat results.md) >> $GITHUB_STEP_SUMMARY
- name: Post results to slack
uses: slackapi/slack-github-action@v2.0.0
with:
webhook: ${{ secrets.SLACK_WEBHOOK_URL }}
webhook-type: incoming-webhook
payload: |
blocks:
- type: "header"
text:
type: "plain_text"
text: Hive coverage report
- type: "section"
text:
type: "mrkdwn"
text: ${{steps.report.outputs.content}}
2 changes: 0 additions & 2 deletions cmd/hive_report/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// Sort by file name.
results.sort_by(|a, b| a.0.cmp(&b.0));

println!("# Hive coverage report\n");

for (file_name, passed, total) in results {
println!("- {}: {}/{}", file_name, passed, total);
}
Expand Down

0 comments on commit 1007322

Please sign in to comment.