-
Notifications
You must be signed in to change notification settings - Fork 38
47 lines (43 loc) · 1.03 KB
/
web3-rust.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
name: Web3 Rust
on:
push:
paths:
- 'web3/**'
pull_request:
paths:
- 'web3/**'
env:
CARGO_TERM_COLOR: always
jobs:
Build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web3
steps:
- uses: actions/checkout@v4
- name: Install Rust components
run: |
cargo fmt --version || rustup component add rustfmt
cargo clippy --version || rustup component add clippy
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-web3-indexer-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-web3-indexer
- name: Build
run: cargo build --verbose
- name: Check format
run: cargo fmt -- --check
- name: Cargo clippy check
env:
RUSTFLAGS: -D warnings
run: cargo clippy
- name: Diff
run: git diff --exit-code