clap/.github/workflows/lint.yml
2021-10-09 19:50:16 +01:00

40 lines
1 KiB
YAML

name: Lint
on:
pull_request:
branches: [master]
push:
branches: [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 unstable-replace" -- -D warnings
- name: Format check
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check