CI: Reduce noise of clippy lints

We move Clippy lints into separate workflows that only run either
directly on branches, or on trial-merges of PRs, to deduplicate the
lint annotations. We will still see stable lints duplicated in nightly,
but that's fine.
This commit is contained in:
Jack Grigg 2021-05-04 09:18:30 +12:00
parent e8f65a2158
commit 8dbc5125c5
3 changed files with 50 additions and 38 deletions

View File

@ -55,44 +55,6 @@ jobs:
- name: Test Orchard book
run: mdbook test book/
clippy:
name: Clippy (1.51.0)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
components: clippy
override: true
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.51.0)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings
clippy-nightly:
name: Clippy (nightly)
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
- name: Run Clippy (nightly)
uses: actions-rs/clippy-check@v1
continue-on-error: true
with:
name: Clippy (nightly)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets
codecov:
name: Code coverage
runs-on: ubuntu-latest

27
.github/workflows/lints-nightly.yml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Nightly lints
# These lints are only informative, so we only run them directly on branches
# and not trial-merges of PRs, to reduce noise.
on: push
jobs:
clippy-nightly:
name: Clippy (nightly)
timeout-minutes: 30
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
override: true
- name: Run Clippy (nightly)
uses: actions-rs/clippy-check@v1
continue-on-error: true
with:
name: Clippy (nightly)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets

23
.github/workflows/lints-stable.yml vendored Normal file
View File

@ -0,0 +1,23 @@
name: Stable lints
# We only run these lints on trial-merges of PRs to reduce noise.
on: pull_request
jobs:
clippy:
name: Clippy (1.51.0)
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.51.0
components: clippy
override: true
- name: Run Clippy
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.51.0)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings