-
Notifications
You must be signed in to change notification settings - Fork 37
79 lines (74 loc) · 2.13 KB
/
lint.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
--- # Rust lint related checks
name: lint
on:
push:
branches: [develop, main]
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: cargo clippy --all-targets -- -D warnings
- run: cargo clippy --all-targets --no-default-features --features cdk_erigon -- -D warnings
udeps:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
tool: cargo-udeps
- run: cargo udeps --quiet
- run: cargo udeps --quiet --tests --benches --examples
rustdoc:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: RUSTDOCFLAGS='-D warnings -A rustdoc::private_intra_doc_links' cargo doc --all --no-deps
# TODO(zero): https://github.com/0xPolygonZero/zk_evm/issues/718
- run: >
RUSTDOCFLAGS='-D warnings -A rustdoc::private_intra_doc_links' cargo doc --no-deps --document-private-items
--package trace_decoder
--package smt_trie
--package zk_evm_proc_macro
--package zk_evm_common
cargo-fmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- run: cargo fmt --check
taplo-fmt:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
tool: taplo-cli
- run: taplo fmt --check
outdated:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust
- uses: taiki-e/install-action@v2
with:
tool: cargo-outdated
- run: cargo xtask outdated