From 3c216269e3fcb8e2102a6960b3cb5f261c234940 Mon Sep 17 00:00:00 2001 From: Zero Date: Fri, 5 May 2023 21:57:03 -0600 Subject: [PATCH] move rustfmt into its own job as well --- .github/workflows/pr.yml | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 35f2129..99aab40 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -5,6 +5,27 @@ on: workflow_dispatch: jobs: + rustfmt: + runs-on: ubuntu-latest + steps: + - name: Check out code into the proper directory + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Cache rust + uses: Swatinem/rust-cache@v2 + + - name: Install rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: rustfmt + + - name: Check formatting + run: cargo fmt --check + + clippy: strategy: fail-fast: false @@ -25,10 +46,7 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust-version }} - components: rustfmt, clippy - - - name: Check formatting - run: cargo fmt --check + components: clippy - name: Check clippy lints run: cargo clippy @@ -53,7 +71,6 @@ jobs: uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust-version }} - components: rustfmt - name: Check build run: cargo build --verbose