Move clippy to ci.yml gated with github.event_name != 'pull_request'
This commit is contained in:
parent
115c1b4830
commit
c120c4518b
15
.github/workflows/ci.yml
vendored
15
.github/workflows/ci.yml
vendored
@ -138,3 +138,18 @@ jobs:
|
||||
continue-on-error: true
|
||||
- run: cd test_suite && cargo web test --target=wasm32-unknown-emscripten --nodejs
|
||||
continue-on-error: true
|
||||
|
||||
clippy:
|
||||
name: Clippy ${{matrix.dir}}
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name != 'pull_request'
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dtolnay/rust-toolchain@clippy
|
||||
# The need for -Aredundant_field_names here is a Clippy bug.
|
||||
# https://github.com/rust-lang/rust-clippy/issues/5356
|
||||
- run: cd serde && cargo clippy --features rc,unstable -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd serde_derive && cargo clippy -- -D clippy::all
|
||||
- run: cd serde_test && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd test_suite && cargo clippy --tests --features unstable -- -D clippy::all -A clippy::redundant_field_names
|
||||
- run: cd test_suite/no_std && cargo clippy -- -D clippy::all -A clippy::redundant_field_names
|
||||
|
30
.github/workflows/clippy.yml
vendored
30
.github/workflows/clippy.yml
vendored
@ -1,30 +0,0 @@
|
||||
name: Clippy
|
||||
|
||||
on:
|
||||
push:
|
||||
schedule: [cron: "40 1 * * *"]
|
||||
|
||||
jobs:
|
||||
stable:
|
||||
name: Clippy ${{matrix.dir}}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- dir: serde
|
||||
features: rc,unstable
|
||||
- dir: serde_derive
|
||||
- dir: serde_test
|
||||
- dir: test_suite
|
||||
features: unstable
|
||||
tests: true
|
||||
- dir: test_suite/no_std
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: dtolnay/rust-toolchain@clippy
|
||||
# The need for -Aredundant_field_names here is a Clippy bug.
|
||||
# https://github.com/rust-lang/rust-clippy/issues/5356
|
||||
- name: cargo clippy ${{matrix.features && format('--features {0}', matrix.features)}}
|
||||
run: cargo clippy --features '${{matrix.features}}' ${{matrix.tests && '--tests'}} -- -Dclippy::all -Aclippy::redundant_field_names
|
||||
working-directory: ${{matrix.dir}}
|
Loading…
x
Reference in New Issue
Block a user