chore(github): run update-book-cli in the lint workflow (#8335)

Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
Delweng
2024-05-24 03:20:40 +08:00
committed by GitHub
parent 0e87ff4da6
commit 8263480a72
4 changed files with 44 additions and 4 deletions

View File

@ -107,6 +107,25 @@ jobs:
components: rustfmt
- run: cargo fmt --all --check
book:
name: book
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.76" # MSRV
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo build --bin reth --workspace --features ethereum
env:
RUSTFLAGS: -D warnings
- run: ./book/cli/update.sh target/debug/reth
- name: Check book changes
run: git diff --exit-code
codespell:
runs-on: ubuntu-latest
timeout-minutes: 30
@ -127,7 +146,7 @@ jobs:
name: lint success
runs-on: ubuntu-latest
if: always()
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, codespell, grafana]
needs: [clippy-binaries, clippy, crate-checks, docs, fmt, book, codespell, grafana]
timeout-minutes: 30
steps:
- name: Decide whether the needed jobs succeeded or failed

View File

@ -262,9 +262,13 @@ def preprocess_help(s: str):
"default: <CACHE_DIR>",
s,
)
# Remove the commit SHA and target architecture triple
# Remove the commit SHA and target architecture triple or fourth
# rustup available targets:
# aarch64-apple-darwin
# x86_64-unknown-linux-gnu
# x86_64-pc-windows-gnu
s = re.sub(
r"default: reth/.*-[0-9A-Fa-f]{6,10}/\w+-\w*-\w+",
r"default: reth/.*-[0-9A-Fa-f]{6,10}/([_\w]+)-(\w+)-(\w+)(-\w+)?",
"default: reth/<VERSION>-<SHA>/<ARCH>",
s,
)
@ -275,6 +279,14 @@ def preprocess_help(s: str):
s,
)
# Remove rpc.max-tracing-requests default value
s = re.sub(
r"(rpc.max-tracing-requests <COUNT>\n.*\n.*\n.*)\[default: \d+\]",
r"\1[default: <NUM CPU CORES-2>]",
s,
flags=re.MULTILINE,
)
return s

View File

@ -22,6 +22,9 @@ Options:
[default: default]
--start-key <START_KEY>
The start of the range to checksum
--chain <CHAIN_OR_PATH>
The chain this node is running.
Possible values are either a built-in chain or the path to a chain specification file.
@ -31,6 +34,12 @@ Options:
[default: mainnet]
--end-key <END_KEY>
The end of the range to checksum
--limit <LIMIT>
The maximum number of records that are queried and used to compute the checksum
--instance <INSTANCE>
Add a new instance of a node.

View File

@ -287,7 +287,7 @@ RPC:
--rpc.max-tracing-requests <COUNT>
Maximum number of concurrent tracing requests
[default: 6]
[default: <NUM CPU CORES-2>]
--rpc.max-blocks-per-filter <COUNT>
Maximum number of blocks that could be scanned per filter request. (0 = entire chain)