# yamllint disable

name: Check
on: [ pull_request ]
env:
  CARGO_TERM_COLOR: always
jobs:
  check:
    runs-on: ubuntu-20.04
    steps:
      - uses: actions/checkout@v3
      - uses: actions/cache@v3
        with:
          path: |
            ~/.cargo/bin/
            ~/.cargo/registry/index/
            ~/.cargo/registry/cache/
            ~/.cargo/git/db/
            target/
          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
      - uses: actions-rs/toolchain@v1.0.7
        with:
          toolchain: stable
          components: rustfmt, clippy
      - uses: actions-rs/cargo@v1.0.3
        with:
          command: fmt
          args: -- --check
      - uses: actions-rs/clippy-check@v1.0.7
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features