From 4efc86ff50c77742218775968baa08aaa2dc6ebd Mon Sep 17 00:00:00 2001 From: Vladislav Mamon Date: Sun, 24 Nov 2024 14:23:58 +0300 Subject: [PATCH] ci: force using nightly channel for fmt --- .github/workflows/checks.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 682413e..2e86512 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -9,8 +9,8 @@ on: workflow_dispatch: jobs: - extract-toolchain: - name: extract toolchain + toolchain: + name: Toolchain runs-on: ubuntu-latest outputs: toolchain: ${{ steps.toolchain.outputs.value }} @@ -24,11 +24,11 @@ jobs: - run: echo "toolchain=${{ steps.toolchain.outputs.value || 'stable' }}" >> $GITHUB_OUTPUT clippy: - name: cargo clippy + name: Clippy runs-on: ubuntu-latest - needs: extract-toolchain + needs: toolchain env: - TOOLCHAIN: ${{ needs.extract-toolchain.outputs.toolchain }} + TOOLCHAIN: ${{ needs.toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master @@ -38,28 +38,28 @@ jobs: - uses: swatinem/rust-cache@v2 - run: cargo clippy -- -D warnings - test: - name: cargo test - needs: extract-toolchain + fmt: + name: Formatting runs-on: ubuntu-latest - env: - TOOLCHAIN: ${{ needs.extract-toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: ${{ env.TOOLCHAIN }} + toolchain: nightly + components: rustfmt - uses: swatinem/rust-cache@v2 - - run: cargo test + - run: cargo +nightly fmt --all -- --check - fmt: - name: cargo fmt + test: + name: Test + needs: toolchain runs-on: ubuntu-latest + env: + TOOLCHAIN: ${{ needs.toolchain.outputs.toolchain }} steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@master with: - toolchain: nightly - components: rustfmt + toolchain: ${{ env.TOOLCHAIN }} - uses: swatinem/rust-cache@v2 - - run: cargo fmt --all -- --check + - run: cargo test