mirror of
https://github.com/clap-rs/clap
synced 2025-01-05 17:28:42 +00:00
41 lines
1 KiB
YAML
41 lines
1 KiB
YAML
|
name: Lint
|
||
|
on:
|
||
|
pull_request:
|
||
|
branches: [master]
|
||
|
push:
|
||
|
branches: [master, staging, trying]
|
||
|
concurrency:
|
||
|
group: lint-${{ github.ref }}
|
||
|
cancel-in-progress: true
|
||
|
jobs:
|
||
|
lint:
|
||
|
name: Lint
|
||
|
runs-on: ubuntu-latest
|
||
|
steps:
|
||
|
- name: Install rust
|
||
|
uses: actions-rs/toolchain@v1
|
||
|
with:
|
||
|
profile: minimal
|
||
|
toolchain: stable
|
||
|
override: true
|
||
|
components: rustfmt, clippy
|
||
|
- name: Cache Builds
|
||
|
uses: Swatinem/rust-cache@v1
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Clippy for almost no features
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: clippy
|
||
|
args: --no-default-features --features "std cargo"
|
||
|
- name: Clippy for all features
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: clippy
|
||
|
args: --features "wrap_help yaml regex" -- -D warnings
|
||
|
- name: Format check
|
||
|
uses: actions-rs/cargo@v1
|
||
|
with:
|
||
|
command: fmt
|
||
|
args: -- --check
|