@@ -14,6 +14,19 @@ on:
1414 - '*'
1515
1616jobs:
17+ ensure_cargo_fmt:
18+ name: Ensure 'cargo fmt' has been run
19+ runs-on: ubuntu-20.04
20+ steps:
21+ - uses: actions-rs/toolchain@v1
22+ with:
23+ toolchain: stable
24+ default: true
25+ profile: minimal
26+ components: rustfmt
27+ - uses: actions/checkout@v2
28+ - run: cargo fmt -- --check
29+
1730 min_version:
1831 name: Minimum supported rust version
1932 runs-on: ubuntu-20.04
@@ -27,12 +40,7 @@ jobs:
2740 toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
2841 default: true
2942 profile: minimal # minimal component installation (ie, no documentation)
30− components: clippy, rustfmt
31− - name: Ensure `cargo fmt` has been run
32− uses: actions-rs/cargo@v1
33− with:
34− command: fmt
35− args: -- --check
43+ components: clippy
3644 - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
3745 uses: actions-rs/cargo@v1
3846 with: