on: [push, pull_request]

name: Cargo Clippy

jobs:
  clippy:
    name: Cargo Clippy
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository and submodules
        uses: actions/checkout@v2
        with:
          submodules: recursive
      - name: Install rust
        uses: dtolnay/rust-toolchain@stable
        with:
          toolchain: stable
          components: clippy
      - name: Clippy
        run: cargo clippy --all-targets -- -D warnings
