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