mirror of
https://github.com/ouch-org/ouch.git
synced 2025-06-07 12:05:46 +00:00
Check the format with Github Action (#126)
* Add cargo fmt to the CI 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
01b6dc89de
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
@ -274,3 +274,26 @@ jobs:
|
|||||||
# with:
|
# with:
|
||||||
# name: 'ouch-x86_64-pc-windows-gnu'
|
# name: 'ouch-x86_64-pc-windows-gnu'
|
||||||
# path: target\x86_64-pc-windows-gnu\release\ouch.exe
|
# path: target\x86_64-pc-windows-gnu\release\ouch.exe
|
||||||
|
|
||||||
|
fmt:
|
||||||
|
name: Check sourcecode format
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
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