From dc314a9e4a16a5638354844bb332bad0566fd079 Mon Sep 17 00:00:00 2001 From: Daniel Eades Date: Wed, 10 Jan 2024 14:31:41 +0000 Subject: [PATCH] split rustfmt and clippy checks into separate jobs --- .github/workflows/ci.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3668958a..c6a29b57 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,21 +42,26 @@ jobs: - name: Execute cargo build run: | cargo build --manifest-path=./graphql_client/Cargo.toml --features="reqwest" --target wasm32-unknown-unknown + + rustfmt: + name: Rustfmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + - run: cargo fmt --all -- --check + lint: - name: Rustfmt and Clippy + name: Clippy runs-on: ubuntu-latest - if: github.repository == 'graphql-rust/graphql-client' steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Install toolchain - uses: dtolnay/rust-toolchain@stable - with: - components: clippy,rustfmt - - name: Execute cargo fmt - run: cargo fmt --all -- --check - - name: Execute cargo clippy - run: cargo clippy --all --all-targets --all-features -- -D warnings + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: nightly-2024-01-10 + components: clippy + - run: cargo clippy --all --all-targets --all-features -- -D warnings + prettier: name: Check prettier runs-on: ubuntu-latest