-
Notifications
You must be signed in to change notification settings - Fork 78
34 lines (32 loc) · 945 Bytes
/
code_style.yml
File metadata and controls
34 lines (32 loc) · 945 Bytes
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
name: Code Style
on:
pull_request:
jobs:
codestyle:
name: Code Style (fmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- name: Check formatting
run: |
cargo fmt --all -- --check
- name: Install libudev-dev
run: |
sudo apt-get update
sudo apt-get install --assume-yes libudev-dev
- name: Check lints (cargo clippy)
run: cargo clippy -- -D warnings
- name: Check additional compilation configs
run: |
# all features disabled
cargo check --tests --no-default-features
# config, used by `cargo-near`, when importing `near-cli-rs` as a lib
cargo check --tests --no-default-features --features ledger