-
Notifications
You must be signed in to change notification settings - Fork 32
38 lines (32 loc) · 1.04 KB
/
Copy pathcode_style.yml
File metadata and controls
38 lines (32 loc) · 1.04 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
name: Code Style Check
on:
push:
branches:
- master
- feature-*
- issue-*
pull_request:
jobs:
code_style:
runs-on: ubuntu-latest
steps:
- name: Install Dependencies
run: sudo apt-get update; sudo apt-get install libarchive-dev libb2-dev liblz4-dev libacl1-dev libzstd-dev liblzma-dev libbz2-dev zlib1g-dev libxml2-dev nettle-dev
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
- name: Install stable toolchain (MSRV-aware lockfile resolution)
uses: dtolnay/rust-toolchain@stable
- name: Generate Cargo.lock
run: cargo generate-lockfile
env:
CARGO_RESOLVER_INCOMPATIBLE_RUST_VERSIONS: fallback
- uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.82.0 # MSRV
components: clippy
- name: Run cargo clippy
run: cargo clippy --all-features --all --tests -- -D clippy::all