mirror of
https://github.com/sharkdp/fd.git
synced 2024-11-17 09:28:25 +01:00
CI: Run clippy on stable and use msrv setting in clippy.toml
This commit is contained in:
parent
f1a5aa0887
commit
a5f17db53a
2 changed files with 21 additions and 6 deletions
26
.github/workflows/CICD.yml
vendored
26
.github/workflows/CICD.yml
vendored
|
@ -14,17 +14,16 @@ on:
|
|||
- '*'
|
||||
|
||||
jobs:
|
||||
min_version:
|
||||
name: Minimum supported rust version
|
||||
code_quality:
|
||||
name: Code quality
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
|
||||
- name: Install rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
||||
toolchain: stable
|
||||
default: true
|
||||
profile: minimal # minimal component installation (ie, no documentation)
|
||||
components: clippy, rustfmt
|
||||
|
@ -33,11 +32,26 @@ jobs:
|
|||
with:
|
||||
command: fmt
|
||||
args: -- --check
|
||||
- name: Run clippy (on minimum supported rust version to prevent warnings we can't fix)
|
||||
- name: Ensure MSRV is set in `clippy.toml`
|
||||
run: grep "^msrv = \"${{ env.MIN_SUPPORTED_RUST_VERSION }}\"\$" clippy.toml
|
||||
- name: Run clippy
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
args: --locked --all-targets --all-features
|
||||
|
||||
min_version:
|
||||
name: Minimum supported rust version
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout source code
|
||||
uses: actions/checkout@v2
|
||||
- name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }})
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }}
|
||||
default: true
|
||||
profile: minimal # minimal component installation (ie, no documentation)
|
||||
- name: Run tests
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
|
|
1
clippy.toml
Normal file
1
clippy.toml
Normal file
|
@ -0,0 +1 @@
|
|||
msrv = "1.42.0"
|
Loading…
Reference in a new issue