From de5d46d3c77b7e85a9b101ac954396d34fa1e633 Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Sat, 2 Oct 2021 14:57:47 +0000 Subject: [PATCH] add a cargo-fmt job to CI --- .github/workflows/checks.yml | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index bad2acdce..26a73dae6 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -13,7 +13,7 @@ jobs: name: "Clippy" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Cache cargo registry uses: actions/cache@v2 @@ -51,7 +51,7 @@ jobs: name: "Documentation" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 @@ -81,3 +81,22 @@ jobs: - run: mdbook test docs - run: mdbook build docs + + fmt: + runs-on: ubuntu-latest + name: "Formatting" + steps: + - uses: actions/checkout@v2 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + components: rustfmt + toolchain: stable + override: true + + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check +