mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 20:11:03 +00:00
CICD: Make the 'cargo fmt' check a toplevel job (#1883)
Mainly to make it easier to see what went wrong when it fails. If this ever gets of out sync with a particular Rust version, we can most likely save the situation by introducing a `rustfmt.toml` file.
This commit is contained in:
parent
d04a83de7b
commit
043f3381b0
20
.github/workflows/CICD.yml
vendored
20
.github/workflows/CICD.yml
vendored
@ -14,6 +14,19 @@ on:
|
|||||||
- '*'
|
- '*'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
ensure_cargo_fmt:
|
||||||
|
name: Ensure 'cargo fmt' has been run
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
default: true
|
||||||
|
profile: minimal
|
||||||
|
components: rustfmt
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- run: cargo fmt -- --check
|
||||||
|
|
||||||
min_version:
|
min_version:
|
||||||
name: Minimum supported rust version
|
name: Minimum supported rust version
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
@ -27,12 +40,7 @@ jobs:
|
|||||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
||||||
default: true
|
default: true
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
profile: minimal # minimal component installation (ie, no documentation)
|
||||||
components: clippy, rustfmt
|
components: clippy
|
||||||
- name: Ensure `cargo fmt` has been run
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: fmt
|
|
||||||
args: -- --check
|
|
||||||
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
||||||
uses: actions-rs/cargo@v1
|
uses: actions-rs/cargo@v1
|
||||||
with:
|
with:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user