mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 18:21:01 +00:00
Add GitHub Actions workflow to run Clippy
This commit is contained in:
@@ -0,0 +1,32 @@
|
|||||||
|
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@nightly
|
||||||
|
with:
|
||||||
|
components: 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}}
|
||||||
Reference in New Issue
Block a user