Skip to content

Commit 3d7285b

Browse files
ci: run rustfmt with +nightly flag
1 parent 360e877 commit 3d7285b

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/rust.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,29 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
command:
26-
- cargo fmt --all -- --check
2726
- cargo check --locked --all-targets
2827
- cargo check --locked --target wasm32-unknown-unknown
2928
- cargo clippy --locked --all-targets
3029
- cargo clippy --locked --target wasm32-unknown-unknown
3130
steps:
3231
- uses: actions/checkout@v6
33-
- run: echo "NIGHTLY_RUST_VERSION=$(grep '^channel =' rust-toolchain.toml | grep -o '".*"' | tr -d '"')" >> $GITHUB_ENV
3432
- uses: ./.github/actions/setup-and-cache-rust
3533
with:
36-
toolchain: ${{ env.NIGHTLY_RUST_VERSION }}
37-
components: rustfmt, clippy
34+
components: clippy
3835
target: wasm32-unknown-unknown
3936
rustflags: ${{ contains(matrix.command, 'wasm32-unknown-unknown') && '--cfg getrandom_backend="wasm_js" -D warnings' || '-D warnings' }}
4037
- run: ${{ matrix.command }}
4138

39+
fmt-check:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v6
43+
- uses: ./.github/actions/setup-and-cache-rust
44+
with:
45+
components: rustfmt
46+
toolchain: nightly
47+
- run: cargo +nightly fmt --all -- --check
48+
4249
test:
4350
runs-on: ubuntu-latest
4451
steps:

0 commit comments

Comments
 (0)