lint-cli.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. # Copyright 2019-2023 Tauri Programme within The Commons Conservancy
  2. # SPDX-License-Identifier: Apache-2.0
  3. # SPDX-License-Identifier: MIT
  4. name: lint cli
  5. on:
  6. push:
  7. branches:
  8. - dev
  9. - next
  10. pull_request:
  11. paths:
  12. - '.github/workflows/lint-cli.yml'
  13. - 'tooling/cli/**'
  14. env:
  15. RUST_BACKTRACE: 1
  16. CARGO_PROFILE_DEV_DEBUG: 0 # This would add unnecessary bloat to the target folder, decreasing cache efficiency.
  17. concurrency:
  18. group: ${{ github.workflow }}-${{ github.ref }}
  19. cancel-in-progress: true
  20. jobs:
  21. fmt:
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: actions-rs/toolchain@v1
  26. with:
  27. profile: minimal
  28. toolchain: stable
  29. override: true
  30. components: rustfmt
  31. - uses: actions-rs/cargo@v1
  32. with:
  33. command: fmt
  34. args: --manifest-path ./tooling/cli/Cargo.toml --all -- --check
  35. clippy:
  36. runs-on: ubuntu-latest
  37. steps:
  38. - uses: actions/checkout@v2
  39. - uses: actions-rs/toolchain@v1
  40. with:
  41. profile: minimal
  42. toolchain: stable
  43. override: true
  44. components: clippy
  45. - name: install dependencies
  46. run: |
  47. sudo apt-get update
  48. sudo apt-get install -y libgtk-3-dev
  49. - uses: Swatinem/rust-cache@v2
  50. with:
  51. workspaces: tooling/cli
  52. - uses: actions-rs/clippy-check@v1
  53. with:
  54. token: ${{ secrets.GITHUB_TOKEN }}
  55. args: --manifest-path ./tooling/cli/Cargo.toml --all-targets --all-features -- -D warnings
  56. name: cli