CI: check code is formatted correctly using rustfmt (#246)

This commit is contained in:
Tony Arcieri 2022-12-20 02:37:04 -07:00 committed by GitHub
parent a0384be8fc
commit 951d489d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,6 +68,16 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --benches --features batch
rustfmt:
name: Check formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all -- --check
clippy:
name: Check that clippy is happy
runs-on: ubuntu-latest
@ -76,4 +86,4 @@ jobs:
- uses: dtolnay/rust-toolchain@1.65
with:
components: clippy
- run: cargo clippy
- run: cargo clippy