Skip to content

Commit 75ff404

Browse files
committed
ci: Use nightly rustfmt to check server formatting
1 parent bcb16bc commit 75ff404

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

.github/workflows/server-ci.yml

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,20 @@ env:
2424
RUST_BACKTRACE: 1
2525

2626
jobs:
27+
check-fmt:
28+
name: Check formatting
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- uses: dtolnay/rust-toolchain@nightly
34+
with:
35+
components: rustfmt
36+
37+
- name: rustfmt
38+
run: cargo fmt -- --check
39+
working-directory: server
40+
2741
test-versions:
2842
name: Server CI
2943
runs-on: ubuntu-latest
@@ -32,10 +46,12 @@ jobs:
3246
rust: [stable, beta]
3347
steps:
3448
- uses: actions/checkout@v4
49+
3550
- uses: dtolnay/rust-toolchain@master
3651
with:
3752
toolchain: ${{ matrix.rust }}
38-
components: clippy, rustfmt
53+
components: clippy
54+
3955
- uses: Swatinem/rust-cache@v2
4056
with:
4157
workspaces: "server -> target"
@@ -47,10 +63,6 @@ jobs:
4763

4864
- uses: taiki-e/install-action@nextest
4965

50-
- name: rustfmt
51-
run: cargo fmt -- --check
52-
working-directory: server
53-
5466
- name: Build
5567
run: cargo test --all-features --no-run --locked
5668
working-directory: server

0 commit comments

Comments
 (0)