on: [push]

jobs:
  check:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        fetch-depth: 1
    - uses: dtolnay/rust-toolchain@nightly
      with:
        components: rustfmt, clippy
    - run: cargo fmt -- --check
    - run: cargo clippy --no-default-features --all-targets -- --deny warnings
    - run: cargo clippy --all-features --all-targets -- --deny warnings
