-
Notifications
You must be signed in to change notification settings - Fork 2
84 lines (71 loc) · 2.01 KB
/
Copy pathbuild.yaml
File metadata and controls
84 lines (71 loc) · 2.01 KB
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
80
81
82
83
84
name: Check Rust
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
FOUNDRY_PROFILE: ci
jobs:
cargo-fmt:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- name: Check-Out
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Nightly
run: |
rustup toolchain install nightly
rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt
- name: cargo +nightly fmt
run: cargo +nightly fmt --all -- --check
cargo-check:
name: cargo check
runs-on: ubuntu-latest
steps:
- name: Check-Out
uses: actions/checkout@v4
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
with:
key: cargo-check
cache-on-failure: true
- name: cargo check --workspace --all-targets --all-features
run: cargo check --workspace --all-targets --all-features
cargo-clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- name: Check-Out
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: stable
- uses: Swatinem/rust-cache@v2
with:
key: cargo-clippy
cache-on-failure: true
- name: cargo clippy --workspace --all-targets --all-features -- -D warnings
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
cargo-test:
name: cargo test
runs-on: ubuntu-latest
env:
ETH_WS_URL: ${{ secrets.ETH_WS_URL }}
BASE_WS_URL: ${{ secrets.BASE_WS_URL }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --workspace --all-targets --features ci -- --nocapture