Skip to content

Commit dc314a9

Browse files
committed
split rustfmt and clippy checks into separate jobs
1 parent a7283cb commit dc314a9

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,21 +42,26 @@ jobs:
4242
- name: Execute cargo build
4343
run: |
4444
cargo build --manifest-path=./graphql_client/Cargo.toml --features="reqwest" --target wasm32-unknown-unknown
45+
46+
rustfmt:
47+
name: Rustfmt
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- uses: dtolnay/rust-toolchain@stable
52+
- run: cargo fmt --all -- --check
53+
4554
lint:
46-
name: Rustfmt and Clippy
55+
name: Clippy
4756
runs-on: ubuntu-latest
48-
if: github.repository == 'graphql-rust/graphql-client'
4957
steps:
50-
- name: Checkout sources
51-
uses: actions/checkout@v4
52-
- name: Install toolchain
53-
uses: dtolnay/rust-toolchain@stable
54-
with:
55-
components: clippy,rustfmt
56-
- name: Execute cargo fmt
57-
run: cargo fmt --all -- --check
58-
- name: Execute cargo clippy
59-
run: cargo clippy --all --all-targets --all-features -- -D warnings
58+
- uses: actions/checkout@v4
59+
- uses: dtolnay/rust-toolchain@master
60+
with:
61+
toolchain: nightly-2024-01-10
62+
components: clippy
63+
- run: cargo clippy --all --all-targets --all-features -- -D warnings
64+
6065
prettier:
6166
name: Check prettier
6267
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)