clippy.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. on:
  2. push:
  3. branches: [ main ]
  4. pull_request:
  5. merge_group:
  6. name: Lints compliance check
  7. env:
  8. CLIPPY_PARAMS: -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo
  9. jobs:
  10. clippy:
  11. strategy:
  12. matrix:
  13. toolchain: [ stable, nightly ]
  14. cargo_flags: [ --all-features, --no-default-features ]
  15. include:
  16. # Nightly is only for reference and allowed to fail
  17. - toolchain: nightly
  18. experimental: true
  19. # async traits are still not supported in stable
  20. - toolchain: stable
  21. cargo_flags: --all-features
  22. experimental: true
  23. runs-on: ubuntu-latest
  24. continue-on-error: ${{ matrix.experimental || false }}
  25. steps:
  26. - uses: actions/checkout@v3
  27. - uses: dtolnay/rust-toolchain@master
  28. with:
  29. toolchain: ${{ matrix.toolchain }}
  30. components: clippy
  31. - name: Run clippy
  32. run: cargo clippy --all ${{ matrix.cargo_flags }} -- -D warnings
  33. # Job to check that all the lint checks succeeded
  34. clippy-check:
  35. needs:
  36. - clippy
  37. runs-on: ubuntu-latest
  38. if: always()
  39. steps:
  40. - run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'