mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-22 07:48:26 +00:00
Add cargo fmt --check to CI and local CI
This commit is contained in:
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@@ -27,6 +27,16 @@ env:
|
||||
# separate ci-compat.yml workflow so their failures don't mark this run red.
|
||||
# ─────────────────────────────────────────────────────────────────────────────
|
||||
jobs:
|
||||
fmt:
|
||||
name: Format check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: rustfmt
|
||||
- run: cargo fmt --check
|
||||
|
||||
build:
|
||||
name: Build (${{ matrix.os }})
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
@@ -153,6 +153,14 @@ run_build() {
|
||||
return 1
|
||||
fi
|
||||
|
||||
info "cargo fmt --check"
|
||||
if cargo fmt --check 2>&1; then
|
||||
record "fmt" 0
|
||||
else
|
||||
record "fmt" 1
|
||||
return 1
|
||||
fi
|
||||
|
||||
info "cargo clippy --all -- -D warnings"
|
||||
if cargo clippy --all -- -D warnings 2>&1; then
|
||||
record "clippy" 0
|
||||
|
||||
Reference in New Issue
Block a user