move rustfmt into its own job as well

This commit is contained in:
Zero 2023-05-05 21:57:03 -06:00
parent 56866a461b
commit 3c216269e3
No known key found for this signature in database
GPG key ID: 3861E636EA1E0E2B

View file

@ -5,6 +5,27 @@ on:
workflow_dispatch:
jobs:
rustfmt:
runs-on: ubuntu-latest
steps:
- name: Check out code into the proper directory
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Cache rust
uses: Swatinem/rust-cache@v2
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: Check formatting
run: cargo fmt --check
clippy:
strategy:
fail-fast: false
@ -25,10 +46,7 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --check
components: clippy
- name: Check clippy lints
run: cargo clippy
@ -53,7 +71,6 @@ jobs:
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust-version }}
components: rustfmt
- name: Check build
run: cargo build --verbose