Skip to content

Commit

Permalink
ci: force using nightly channel for fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
norskeld committed Nov 24, 2024
1 parent 65e4d8b commit 4efc86f
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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

0 comments on commit 4efc86f

Please sign in to comment.