Skip to content

Commit

Permalink
split rustfmt and clippy checks into separate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleades committed Jan 10, 2024
1 parent a7283cb commit dc314a9
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit dc314a9

Please sign in to comment.