Skip to content

Commit 98befbf

Browse files
Update Rust formatting check in CI workflow
The commit integrates the formatting check into the main CI workflow instead of running it as a separate job. The 'Check Format' step now directly runs 'cargo fmt -- --check' command. This simplifies the configuration, eliminates the need for additional dependencies.
1 parent 683024f commit 98befbf

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,15 @@ jobs:
2828
submodules: recursive
2929
- uses: dtolnay/rust-toolchain@master
3030
with:
31-
components: clippy
31+
components: clippy, rustfmt
3232
toolchain: ${{ matrix.rust }}
3333
- run: sudo apt-get -y install libmetis-dev libclang-dev
3434
if: matrix.features == 'use-system'
35+
- name: Check Format
36+
run: cargo fmt -- --check
3537
- name: Run Check
3638
run: cargo check --features ${{ matrix.features }} --no-default-features
3739
- name: Run Clippy
3840
run: cargo clippy --features ${{ matrix.features }} --no-default-features
3941
- name: Run Tests
4042
run: cargo test --features ${{ matrix.features }} --no-default-features --all
41-
42-
fmt:
43-
name: Rustfmt
44-
runs-on: ubuntu-22.04
45-
steps:
46-
- uses: actions/checkout@v4
47-
with:
48-
submodules: recursive
49-
- uses: dtolnay/rust-toolchain@stable
50-
with:
51-
components: rustfmt
52-
- uses: actions-rs/cargo@v1
53-
with:
54-
command: fmt
55-
args: -p metis -- --check

0 commit comments

Comments
 (0)