lint-rust.yml 1018 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Copyright 2019-2024 Tauri Programme within The Commons Conservancy
  2. # SPDX-License-Identifier: Apache-2.0
  3. # SPDX-License-Identifier: MIT
  4. name: lint rust
  5. on:
  6. push:
  7. branches:
  8. - dev
  9. pull_request:
  10. paths:
  11. - '.github/workflows/lint-cli.yml'
  12. - 'crates/**'
  13. env:
  14. RUST_BACKTRACE: 1
  15. CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
  16. concurrency:
  17. group: ${{ github.workflow }}-${{ github.ref }}
  18. cancel-in-progress: true
  19. jobs:
  20. clippy:
  21. runs-on: ubuntu-latest
  22. steps:
  23. - uses: actions/checkout@v4
  24. - name: install rust stable and clippy
  25. uses: dtolnay/rust-toolchain@stable
  26. with:
  27. components: clippy
  28. - name: install dependencies
  29. run: |
  30. sudo apt-get update
  31. sudo apt-get install -y libgtk-3-dev webkit2gtk-4.1 libayatana-appindicator3-dev
  32. - uses: Swatinem/rust-cache@v2
  33. - run: cargo clippy --all-targets --all-features -- -D warnings