clippy.yml 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. {{{{raw}}}}
  2. name: Check
  3. on:
  4. push:
  5. branches:
  6. - main
  7. paths:
  8. - ".github/workflows/check.yml"
  9. - "**/*.rs"
  10. - "**/Cargo.toml"
  11. pull_request:
  12. branches:
  13. - main
  14. paths:
  15. - ".github/workflows/check.yml"
  16. - "**/*.rs"
  17. - "**/Cargo.toml"
  18. concurrency:
  19. group: ${{ github.workflow }}-${{ github.ref }}
  20. cancel-in-progress: true
  21. jobs:
  22. fmt:
  23. runs-on: ubuntu-latest
  24. steps:
  25. - uses: actions/checkout@v4
  26. - uses: dtolnay/rust-toolchain@stable
  27. with:
  28. components: rustfmt
  29. - run: cargo fmt --all -- --check
  30. clippy:
  31. strategy:
  32. fail-fast: false
  33. matrix:
  34. platform: [ubuntu-latest, macos-latest, windows-latest]
  35. runs-on: ${{ matrix.platform }}
  36. steps:
  37. - uses: actions/checkout@v4
  38. - uses: dtolnay/rust-toolchain@stable
  39. with:
  40. components: clippy
  41. - name: install webkit2gtk
  42. if: matrix.platform == 'ubuntu-latest'
  43. run: |
  44. sudo apt-get update
  45. sudo apt-get install -y webkit2gtk-4.1
  46. - uses: Swatinem/rust-cache@v2
  47. - run: cargo clippy --all-targets --all-features -- -D warnings
  48. {{{{/raw}}}}