-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(l1, l2, levm): loc reporter (#1274)
Co-authored-by: Tomás Arjovsky <[email protected]>
- Loading branch information
Showing
2 changed files
with
27 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,28 +26,15 @@ jobs: | |
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Generate the loc report | ||
id: loc-report | ||
run: | | ||
make loc | ||
echo "content=$(cat loc_report.md)" >> $GITHUB_OUTPUT | ||
- name: Post results in summary | ||
run: | | ||
echo "# `ethrex` lines of code report:\n\n" >> $GITHUB_STEP_SUMMARY | ||
$(cat loc_report.md) >> $GITHUB_STEP_SUMMARY | ||
echo "# `ethrex` lines of code report" >> $GITHUB_STEP_SUMMARY | ||
cat loc_report.md >> $GITHUB_STEP_SUMMARY | ||
- name: Post results to slack | ||
uses: slackapi/[email protected] | ||
with: | ||
webhook: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
webhook-type: incoming-webhook | ||
payload: | | ||
blocks: | ||
- type: "header" | ||
text: | ||
type: "plain_text" | ||
text: ethrex lines of code report | ||
- type: "section" | ||
text: | ||
type: "mrkdwn" | ||
text: ${{steps.loc-report.outputs.content}} | ||
env: | ||
url: ${{ secrets.SLACK_WEBHOOK_URL }} | ||
run: sh publish_loc.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
curl -X POST $url \ | ||
-H 'Content-Type: application/json; charset=utf-8' \ | ||
--data @- <<EOF | ||
$(jq -n --arg text "$(cat loc_report.md)" '{ | ||
"blocks": [ | ||
{ | ||
"type": "header", | ||
"text": { | ||
"type": "plain_text", | ||
"text": "Weekly ethrex lines of code report" | ||
} | ||
}, | ||
{ | ||
"type": "section", | ||
"text": { | ||
"type": "mrkdwn", | ||
"text": $text | ||
} | ||
} | ||
] | ||
}') | ||
EOF |