move rustfmt into its own job as well
This commit is contained in:
parent
56866a461b
commit
3c216269e3
1 changed files with 22 additions and 5 deletions
27
.github/workflows/pr.yml
vendored
27
.github/workflows/pr.yml
vendored
|
|
@ -5,6 +5,27 @@ on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
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:
|
clippy:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
|
|
@ -25,10 +46,7 @@ jobs:
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust-version }}
|
toolchain: ${{ matrix.rust-version }}
|
||||||
components: rustfmt, clippy
|
components: clippy
|
||||||
|
|
||||||
- name: Check formatting
|
|
||||||
run: cargo fmt --check
|
|
||||||
|
|
||||||
- name: Check clippy lints
|
- name: Check clippy lints
|
||||||
run: cargo clippy
|
run: cargo clippy
|
||||||
|
|
@ -53,7 +71,6 @@ jobs:
|
||||||
uses: dtolnay/rust-toolchain@master
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ matrix.rust-version }}
|
toolchain: ${{ matrix.rust-version }}
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Check build
|
- name: Check build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue