Skip to content

Commit 5768e89

Browse files
committed
ci(template): Use nightly toolchain for rustfmt job
1 parent 9b315fb commit 5768e89

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

template/.github/workflows/build.yml.j2

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ env:
2727
CARGO_INCREMENTAL: '0'
2828
CARGO_PROFILE_DEV_DEBUG: '0'
2929
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"
30+
RUST_NIGHTLY_TOOLCHAIN_VERSION: "{[ rust_nightly_version }]"
3031
PYTHON_VERSION: "{[ python_version }]"
3132
RUSTFLAGS: "-D warnings"
3233
RUSTDOCFLAGS: "-D warnings"
@@ -136,9 +137,11 @@ jobs:
136137
submodules: recursive
137138
- uses: dtolnay/rust-toolchain@c5a29ddb4d9d194e7c84ec8c3fba61b1c31fee8c
138139
with:
139-
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
140+
toolchain: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
140141
components: rustfmt
141-
- run: cargo fmt --all -- --check
142+
- env:
143+
RUST_TOOLCHAIN_VERSION: ${{ env.RUST_NIGHTLY_TOOLCHAIN_VERSION }}
144+
run: cargo "+$RUST_TOOLCHAIN_VERSION" fmt --all -- --check
142145

143146
run_clippy:
144147
name: Run Clippy

0 commit comments

Comments
 (0)