Skip to content

Commit eaf2892

Browse files
danieleadesdaniel.eades
authored and
daniel.eades
committed
split rustfmt and clippy checks into separate jobs
1 parent 381d41e commit eaf2892

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

.github/workflows/ci.yml

+17-13
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,26 @@ jobs:
4545
- name: Execute cargo build
4646
run: |
4747
cargo build --manifest-path=./graphql_client/Cargo.toml --features="reqwest" --target wasm32-unknown-unknown
48+
49+
rustfmt:
50+
name: Rustfmt
51+
runs-on: ubuntu-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- uses: dtolnay/rust-toolchain@stable
55+
- run: cargo fmt --all -- --check
56+
4857
lint:
49-
name: Rustfmt and Clippy
58+
name: Clippy
5059
runs-on: ubuntu-latest
51-
if: github.repository == 'graphql-rust/graphql-client'
5260
steps:
53-
- name: Checkout sources
54-
uses: actions/checkout@v4
55-
- name: Install toolchain
56-
uses: dtolnay/rust-toolchain@stable
57-
with:
58-
toolchain: ${{ env.clippy_rust_version }}
59-
components: clippy,rustfmt
60-
- name: Execute cargo fmt
61-
run: cargo fmt --all -- --check
62-
- name: Execute cargo clippy
63-
run: cargo clippy --all --all-targets --all-features -- -D warnings
61+
- uses: actions/checkout@v4
62+
- uses: dtolnay/rust-toolchain@master
63+
with:
64+
toolchain: ${{ env.clippy_rust_version }}
65+
components: clippy
66+
- run: cargo clippy --all --all-targets --all-features -- -D warnings
67+
6468
prettier:
6569
name: Check prettier
6670
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)