feat(l1): rpc endpoint debug_TraceBlockByNumber
with support for callTracer
#3055
This file contains hidden or 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
name: PR Lines of Code Analysis | |
on: | |
pull_request: | |
branches: ["**"] | |
permissions: | |
pull-requests: write | |
jobs: | |
report-loc-changes: | |
name: Report PR Line Changes | |
runs-on: ubuntu-latest | |
# Skip the job if the PR is from a fork since it doesn't have permissions to post comments | |
if: github.event.pull_request.head.repo.fork == false | |
steps: | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@1.82.0 | |
with: | |
components: rustfmt, clippy | |
- name: Set up cargo cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Checkout Base | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.base.sha }} | |
- name: Run Lines of Code Counter for base | |
run: cd tooling/loc && make loc-detailed | |
# This creates current_detailed_loc_report.json for the base branch | |
- name: Rename base report to previous_detailed_loc_report.json | |
run: mv tooling/loc/current_detailed_loc_report.json tooling/loc/previous_detailed_loc_report.json | |
- name: Checkout PR | |
uses: actions/checkout@v4 | |
with: | |
clean: "false" # Don't clean the workspace, so we can keep the previous report | |
ref: ${{ github.event.pull_request.head.sha }} | |
- name: Run Lines of Code Counter for PR | |
run: cd tooling/loc && make loc-detailed | |
# This creates current_detailed_loc_report.json | |
- name: Compare Detailed Lines of Code Count | |
run: cd tooling/loc && make loc-compare-detailed | |
# This reads current_detailed_loc_report.json and previous_detailed_loc_report.json | |
# and outputs detailed_loc_report.txt | |
- name: Check if report exists | |
id: check_report | |
run: | | |
if [ -s tooling/loc/detailed_loc_report.txt ]; then | |
echo "report_exists=true" >> $GITHUB_OUTPUT | |
else | |
echo "report_exists=false" >> $GITHUB_OUTPUT | |
fi | |
- name: Find comment | |
if: steps.check_report.outputs.report_exists == 'true' | |
continue-on-error: true | |
uses: peter-evans/find-comment@v3 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: "github-actions[bot]" | |
body-includes: "Total lines changed" | |
- name: Create Comment | |
if: steps.check_report.outputs.report_exists == 'true' | |
uses: peter-evans/create-or-update-comment@v4 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body-path: tooling/loc/detailed_loc_report.txt | |
edit-mode: replace |