rust_lint.yml 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. name: Rust lint
  2. on:
  3. push:
  4. branches:
  5. - "main"
  6. - "release/*"
  7. paths:
  8. - "frontend/rust-lib/**"
  9. - "shared-lib/**"
  10. pull_request:
  11. branches:
  12. - "main"
  13. - "release/*"
  14. paths:
  15. - "frontend/rust-lib/**"
  16. - "shared-lib/**"
  17. env:
  18. CARGO_TERM_COLOR: always
  19. jobs:
  20. rust-fmt:
  21. name: Rustfmt
  22. runs-on: ubuntu-latest
  23. steps:
  24. - uses: actions/checkout@v2
  25. - uses: actions-rs/toolchain@v1
  26. with:
  27. toolchain: 'stable-2022-04-07'
  28. override: true
  29. - uses: subosito/flutter-action@v1
  30. with:
  31. flutter-version: '3.3.9'
  32. channel: "stable"
  33. - name: Rust Deps
  34. working-directory: frontend
  35. run: |
  36. cargo install cargo-make
  37. cargo make appflowy-deps-tools
  38. - name: Build FlowySDK
  39. working-directory: frontend
  40. run: |
  41. cargo make --profile development-linux-x86_64 appflowy-sdk-dev
  42. - run: rustup component add rustfmt
  43. working-directory: frontend/rust-lib
  44. - name: rustfmt
  45. run: cargo fmt --all -- --check
  46. working-directory: frontend/rust-lib/
  47. - run: rustup component add clippy
  48. working-directory: frontend/rust-lib
  49. - name: clippy
  50. run: cargo clippy --no-default-features
  51. working-directory: frontend/rust-lib