Skip to content

Commit 70176c4

Browse files
committed
ci: restore rust-toolchain file after checking formatting with rustfmt
1 parent 38fbc22 commit 70176c4

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

.github/workflows/clippy_dev.yml

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,26 @@ jobs:
2525
- name: Checkout
2626
uses: actions/[email protected]
2727

28+
# To test formatting, we need to temporarily disable the rust-toolchain file
29+
- name: remove toolchain file
30+
run: rm rust-toolchain
31+
32+
- name: rust-toolchain
33+
uses: actions-rs/[email protected]
34+
with:
35+
toolchain: nightly
36+
target: x86_64-unknown-linux-gnu
37+
profile: minimal
38+
components: rustfmt
39+
default: true
40+
41+
- name: Test fmt
42+
run: cargo dev fmt --check
43+
44+
# Restore the rust-toolchain-file
45+
- name: Restore rust-toolchain-file
46+
run: git checkout rust-toolchain
47+
2848
# Run
2949
- name: Build
3050
run: cargo build --features deny-warnings
@@ -36,9 +56,6 @@ jobs:
3656
- name: Test update_lints
3757
run: cargo dev update_lints --check
3858

39-
- name: Test fmt
40-
run: cargo dev fmt --check
41-
4259
# Lintcheck
4360
- name: build lintcheck
4461
run: cargo build --features lintcheck,deny-warnings

0 commit comments

Comments
 (0)