From f2eaf9584cf8d396660f325594b835cbd70dedfa Mon Sep 17 00:00:00 2001 From: Jose Celano Date: Tue, 18 Oct 2022 13:51:41 +0100 Subject: [PATCH] feat: use nightly toolchain for formatting @da2ce7 started using the nightly build for rust formatting here: https://github.com/torrust/torrust-tracker/pull/99 And the job 'format' in the workflow did not work, showing these warnings: ``` Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel. Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel. Warning: can't set `imports_granularity = Module`, unstable features are only available in nightly channel. Warning: can't set `group_imports = StdExternalCrate`, unstable features are only available in nightly channel. ``` So we needed the nightly channel anyway. --- .github/workflows/test_build_release.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test_build_release.yml b/.github/workflows/test_build_release.yml index 87f6a9488..1266ae51f 100644 --- a/.github/workflows/test_build_release.yml +++ b/.github/workflows/test_build_release.yml @@ -13,11 +13,15 @@ jobs: - uses: actions-rs/toolchain@v1 with: profile: minimal - toolchain: stable - components: rustfmt + toolchain: nightly + override: true + components: rustfmt, clippy - uses: Swatinem/rust-cache@v1 - name: Check Rust Formatting - run: cargo fmt --check + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --check test: needs: format