style(lib): run rustfmt and enforce in CI
This commit is contained in:
24
.github/workflows/CI.yml
vendored
24
.github/workflows/CI.yml
vendored
@@ -9,9 +9,31 @@ env:
|
||||
RUST_BACKTRACE: 1
|
||||
|
||||
jobs:
|
||||
style:
|
||||
name: Check Style
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v1
|
||||
|
||||
- name: Install Rust
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt
|
||||
|
||||
- name: cargo fmt --check
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
||||
|
||||
test:
|
||||
name: Test ${{ matrix.rust }} on ${{ matrix.os }}
|
||||
|
||||
needs: [style]
|
||||
strategy:
|
||||
matrix:
|
||||
rust:
|
||||
|
||||
Reference in New Issue
Block a user