name: Nightly lints

# We only run these on trial-merges of PRs to reduce noise.
on: pull_request

jobs:
  clippy:
    name: Clippy (nightly)
    timeout-minutes: 30
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions-rs/toolchain@v1
        with:
          toolchain: nightly
          components: clippy
          override: true
      - name: Run Clippy
        uses: actions-rs/clippy-check@v1
        with:
          name: Clippy (stable)
          token: ${{ secrets.GITHUB_TOKEN }}
          args: --all-features --release -- -D warnings
