mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-28 21:51:50 +00:00
ci: check code formats
Use a job to check the format of the sourcecode with `cargo fmt` command. The new step does not change any code, but returns an error when `check` does not pass with 0 issues.
This commit is contained in:
parent
4cfc7b972b
commit
6c20c622f3
25
.github/workflows/build.yml
vendored
25
.github/workflows/build.yml
vendored
@ -274,3 +274,28 @@ jobs:
|
||||
# with:
|
||||
# name: 'ouch-x86_64-pc-windows-gnu'
|
||||
# path: target\x86_64-pc-windows-gnu\release\ouch.exe
|
||||
|
||||
fmt:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: nightly
|
||||
target: x86_64-unknown-linux-musl
|
||||
components: rustfmt
|
||||
override: true
|
||||
|
||||
- name: Check format with cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all -- --check
|
||||
|
Loading…
x
Reference in New Issue
Block a user