From 7438fe92cfa37b80071f1c28adaeaf22aaca166a Mon Sep 17 00:00:00 2001 From: Valentin Tolmer Date: Thu, 21 Aug 2025 01:38:07 +0200 Subject: [PATCH] github: pin the CI rust version to 1.85.0 --- .github/workflows/rust.yml | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 19ea967..fe7e732 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -8,6 +8,7 @@ on: env: CARGO_TERM_COLOR: always + MSRV: 1.85.0 jobs: pre_job: @@ -34,13 +35,18 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v5.0.0 + - name: Install Rust + id: toolchain + uses: dtolnay/rust-toolchain@master + with: + toolchain: "${{ env.MSRV }}" - uses: Swatinem/rust-cache@v2 - name: Build run: cargo build --verbose --workspace - name: Run tests - run: cargo test --verbose --workspace + run: cargo +${{steps.toolchain.outputs.name}} test --verbose --workspace - name: Generate GraphQL schema - run: cargo run -- export_graphql_schema -o generated_schema.graphql + run: cargo +${{steps.toolchain.outputs.name}} run -- export_graphql_schema -o generated_schema.graphql - name: Check schema run: diff schema.graphql generated_schema.graphql || (echo "The schema file is out of date. Please run `./export_schema.sh`" && false) @@ -53,14 +59,14 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v5.0.0 - - - uses: Swatinem/rust-cache@v2 - - - name: Run cargo clippy - uses: actions-rs/cargo@v1 + - name: Install Rust + id: toolchain + uses: dtolnay/rust-toolchain@master with: - command: clippy - args: --tests --all -- -D warnings + toolchain: "${{ env.MSRV }}" + components: clippy + - uses: Swatinem/rust-cache@v2 + - run: cargo +${{steps.toolchain.outputs.name}} clippy --tests --workspace -- -D warnings format: name: cargo fmt @@ -70,14 +76,14 @@ jobs: steps: - name: Checkout sources uses: actions/checkout@v5.0.0 - - - uses: Swatinem/rust-cache@v2 - - - name: Run cargo fmt - uses: actions-rs/cargo@v1 + - name: Install Rust + id: toolchain + uses: dtolnay/rust-toolchain@master with: - command: fmt - args: --all -- --check + toolchain: "${{ env.MSRV }}" + components: rustfmt + - uses: Swatinem/rust-cache@v2 + - run: cargo +${{steps.toolchain.outputs.name}} fmt --check --all coverage: name: Code coverage