ci(actions): improve rust workflow
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
name: Rust
|
name: Test Rust
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -31,27 +31,6 @@ jobs:
|
|||||||
command: clippy
|
command: clippy
|
||||||
args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic
|
args: --verbose --all-targets --all-features -- -D clippy::all -D clippy::pedantic
|
||||||
|
|
||||||
rustfmt:
|
|
||||||
name: Rustfmt
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
continue-on-error: true
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Setup Rust
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
profile: minimal
|
|
||||||
components: rustfmt
|
|
||||||
|
|
||||||
- name: Check format
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: -- --check --verbose
|
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
name: Test ${{ matrix.os }} ${{ matrix.toolchain }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
name: Rust Code Formatting
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
rustfmt:
|
||||||
|
name: Rustfmt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Setup Rust
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
profile: minimal
|
||||||
|
components: rustfmt
|
||||||
|
|
||||||
|
- name: Check format
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: -- --check --verbose
|
||||||
Reference in New Issue
Block a user